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
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. James Nachlin wrote:> 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On Feb 1, 2006, at 2:20 PM, Jim Nachlin wrote:> 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. > > > James Nachlin wrote: >> 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 >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/railsJim, 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
>>> 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. > > 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"[~ 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? > > ScottThat was it! Dumb mistake. Thank you.