Forum: Ruby on Rails apache2 / fcgi / RoR - no connection

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
James Nachlin (Guest)
on 2006-02-01 21:37
(Received via mailing list)
Hi,

I've generated a new Rails app and dummy controller "foo" with method
"hello".  I am trying to run it under Apache/2.0.53 with fastcgi, and
getting the index.html page when I hit http://localhost/foo/hello, or
for any other request (http://localhost/kdjfslkfjs).  Also, there is
nothing in the rails logs, and no errors in the apache logs.

Relevant bit of httpd.conf:
<IfModule mod_fastcgi.c>
   AddHandler fastcgi-script .fcgi
</IfModule>
FastCgiIpcDir /tmp
FastCgiServer "/tmp/rubystuff/testapp/public/dispatch.fcgi"
-idle-timeout 20-initial-env RAILS_ENV=development -processes 2
FastCgiConfig -maxClassProcesses 1 -maxProcesses 1 -minProcesses 1
-processSlack 1
[ ... ]
     <Directory /tmp/rubystuff/testapp/public>
         RewriteEngine On
         RewriteRule ^$ index.html [QSA]
         RewriteRule ^([^.]+)$ $1.html [QSA]
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
         Options Indexes +ExecCGI +FollowSymLinks
         Order allow,deny
         allow from all
     </Directory>


and dispatch.fcgi looks like:
#!/usr/bin/ruby
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
RailsFCGIHandler.process!


Any help appreciated,
Jim
Jim N. (Guest)
on 2006-02-02 00:22
(Received via mailing list)
Another thing about this is that the same thing happens even with a
broken dispatch.fcgi, that is, if Iput some bad ruby syntax in
dispatch.fcgi, there is no error message anywhere.
Scott W. (Guest)
on 2006-02-02 05:49
(Received via mailing list)
On Feb 1, 2006, at 2:20 PM, Jim N. wrote:

>> localhost/foo/hello, or for any other request (http://localhost/
>> -processSlack 1
>>     </Directory>
>> http://lists.rubyonrails.org/mailman/listinfo/rails
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails

Jim,

Nothing obviously wrong that I notice. Not that that means much!

Are your FastCGI servers starting up? What does this show you after
you restart Apache?
ps aux | grep "fcgi"

Does regular old CGI work for your app?

What does your public/.htaccess file look like?

Scott
Jim N. (Guest)
on 2006-02-02 18:52
(Received via mailing list)
>
> Are your FastCGI servers starting up? What does this show you after  you
> restart Apache?
> ps aux | grep "fcgi"

[~ 11:42:44]$ ps ax | grep fcgi
32720 ?        S      0:00 /usr/sbin/fcgi- -k start
32721 ?        R      0:01 /usr/bin/ruby
/tmp/rubystuff/testapp/public/dispatch.fcgi
32730 ?        R      0:00 /usr/bin/ruby
/tmp/rubystuff/testapp/public/dispatch.fc

>
> Does regular old CGI work for your app?

Yes but it's incredibly slow, like <1 requests/sec mean.

>
> What does your public/.htaccess file look like?
>
> Scott

That was it!  Dumb mistake.  Thank you.
This topic is locked and can not be replied to.