Running on Fedora Core I have been playing with some of the tutorials and one of them had me install lighttpd and lighttpd-fastcgi and that was much faster than apache seems to be. How do I get fastcgi stuff to work on apache... I have this setup for my tutorial environment in httpd.conf <VirtualHost *> DocumentRoot /home/craig/cookbook/public ServerName cookbook <Directory "/home/craig/cookbook/public"> Options ExecCGI FollowSymLinks AllowOverride all allow from all </Directory> </VirtualHost> and it''s considerably slower than the lighttpd server. Thanks Craig
Am Donnerstag, den 05.01.2006, 22:06 -0700 schrieb Craig White:> Running on Fedora Core > > I have been playing with some of the tutorials and one of them had me > install lighttpd and lighttpd-fastcgi and that was much faster than > apache seems to be. > > How do I get fastcgi stuff to work on apache... > > I have this setup for my tutorial environment in httpd.conf > > <VirtualHost *> > DocumentRoot /home/craig/cookbook/public > ServerName cookbook > <Directory "/home/craig/cookbook/public"> > Options ExecCGI FollowSymLinks > AllowOverride all > allow from all > </Directory> > </VirtualHost> > > and it''s considerably slower than the lighttpd server.It seems to me, that you are not starting any FCGI processes. I am missing a line like this in your apache configuration: FastCgiServer /var/www/myrailsapp/public/dispatch.fcgi -initial-env RAILS_ENV=production -processes 3 -idle-timeout 60
Norman Timmler wrote:> Am Donnerstag, den 05.01.2006, 22:06 -0700 schrieb Craig White: > >> Running on Fedora Core >> >> I have been playing with some of the tutorials and one of them had me >> install lighttpd and lighttpd-fastcgi and that was much faster than >> apache seems to be. >> >> How do I get fastcgi stuff to work on apache... >> >> I have this setup for my tutorial environment in httpd.conf >> >> <VirtualHost *> >> DocumentRoot /home/craig/cookbook/public >> ServerName cookbook >> <Directory "/home/craig/cookbook/public"> >> Options ExecCGI FollowSymLinks >> AllowOverride all >> allow from all >> </Directory> >> </VirtualHost> >> >> and it''s considerably slower than the lighttpd server. >> > > It seems to me, that you are not starting any FCGI processes. I am > missing a line like this in your apache configuration: > > FastCgiServer /var/www/myrailsapp/public/dispatch.fcgi -initial-env > RAILS_ENV=production -processes 3 -idle-timeout 60 > >In my Apache configuration these line is in <Directory> directive: AddHandler fastcgi-script .fcgi And .htaccess from rails public directory is updated to use FCGI dispatcher instead of CGI one: RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com -> tools, scripts, tricks from our code lab: http://source.mihelac.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060106/aeb5ddee/attachment.html
Am Freitag, den 06.01.2006, 10:40 +0100 schrieb Bojan Mihelac:> Norman Timmler wrote: > > Am Donnerstag, den 05.01.2006, 22:06 -0700 schrieb Craig White: > > > > > Running on Fedora Core > > > > > > I have been playing with some of the tutorials and one of them had me > > > install lighttpd and lighttpd-fastcgi and that was much faster than > > > apache seems to be. > > > > > > How do I get fastcgi stuff to work on apache... > > > > > > I have this setup for my tutorial environment in httpd.conf > > > > > > <VirtualHost *> > > > DocumentRoot /home/craig/cookbook/public > > > ServerName cookbook > > > <Directory "/home/craig/cookbook/public"> > > > Options ExecCGI FollowSymLinks > > > AllowOverride all > > > allow from all > > > </Directory> > > > </VirtualHost> > > > > > > and it''s considerably slower than the lighttpd server. > > > > > > > It seems to me, that you are not starting any FCGI processes. I am > > missing a line like this in your apache configuration: > > > > FastCgiServer /var/www/myrailsapp/public/dispatch.fcgi -initial-env > > RAILS_ENV=production -processes 3 -idle-timeout 60 > > > > > In my Apache configuration these line is in <Directory> directive: > AddHandler fastcgi-script .fcgi > > And .htaccess from rails public directory is updated to use FCGI > dispatcher instead of CGI one: > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]Ok, i checked this: If you have no FastCgiServer directive, Apache starts up a new FCGI processes every time all other FCGI processes are busy. The first time you send a request to your application, the first process is spawned. If my understanding is right, this could end in uncountable FCGI processes if your server is under heavy load. So it is better to control the process spawning with the FastCGIServer directive. But this was not your question: If you set the your RewriteRule to dispatch.fcgi you should run under FCGI. You can check if some processes like /usr/local/bin/ruby /var/www/myrailsapp/public/dispatch.fcgi exist after requesting your application. Maybe LightHttpd is faster, at all ;)