Apache2 / fcgi / RoR - no connection

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:

AddHandler fastcgi-script .fcgi

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

and dispatch.fcgi looks like:
#!/usr/bin/ruby
require File.dirname(FILE) + “/…/config/environment”
require ‘fcgi_handler’
RailsFCGIHandler.process!

Any help appreciated,
Jim

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.

On Feb 1, 2006, at 2:20 PM, Jim N. wrote:

localhost/foo/hello, or for any other request (http://localhost/
-processSlack 1

http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
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

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs