[CentOS] Apache, fastcgi, ruby-on-rails etc.

Michael Metz metz at speedpartner.de
Sun Mar 12 17:30:58 UTC 2006

Craig White wrote:
> On Sun, 2006-03-12 at 17:33 +0100, Michael Metz wrote:
>> Hi all,
>> I've read a bit about fastcgi, and wondered if it might be an 
>> interesting solution for e.g. running php in a user-switched environment 
>> or running ruby-on-rails etc.
>> But I wonder why nobody (searched on Google) seems to use CentOS with 
>> mod_fastcgi for Apache 2.x.
>> And I also wonder why people actually using Apache 2.x and ruby-on-rails 
>> with CentOS did run a lighthttpd-fastcgi inbetween and reverse-proxying 
>> requests from Apache to lighthttpd to actually forward them to RoR 
>> running as fastcgi.
>> Could sombody please give me a hint?
> ----
> my original efforts at setting up ruby on Fedora, I used lighttpd
> w/fastcgi and it was fairly easy to set up.
> my current 'production' system is using CentOS 4 & apache w/ fastcgi and
> it was a little more effort to get working but it works and is fine. I
> really don't want to bother with also running lighthttpd at this point
> (and then using apache to proxy the rails stuff to lighttpd at this
> point, primarily because it's not an issue and I'm lazy and I believe in
> keep it simple).

I really appreciate to hear that. So at least it actually works without 
lighthttpd inbetween :-)

> I think the reason that people do things like that is because they need
> to run apache on the system for some stuff which will tie up ports
> 80/443 and then lightty can't use them so it has to use other ports and
> you simply proxy the paths to the lightty application and their specific
> ports. This allows the speed of lightty and the user/dns simplicity of
> url's without using the specific port assignments which would
> necessarily have to be used when running lightty on a system already
> runing apache.

I agree that it might make some sense to replace apache with lighthttpd 
in some setups. But to my understanding when you proxy a request through 
that also ties up an apache-process. And you might run into problems 
because the application running in lighthttpd might have problems 
getting the original requester-IP. Or am I wrong? So basically I still 
see no point in using lighthttpd there inbetween - only that I found 
ready-to-use lighthttpd-fastcgi-packages (build for CentOS), whereas I 
didn't find httpd-mod_fastcgi-RPMs.


More information about the CentOS mailing list