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?
Regards, Michael
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 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.
Is that what you were looking for?
Craig
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.
Regards, Michael
On Sun, 2006-03-12 at 18:30 +0100, Michael Metz wrote:
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 :-)
---- actually, I think you have it the other way around...apache would do the proxy and be the in between in the scenario I just pointed out. I'm not sure if lightty does proxy
Anyway, those in the know (and I am not one of those), say that lightty is much faster at delivering the dynamic content via fastcgi than is apache - even apache 2.0 with fastcgi
To answer your questions though...
Rails will work on apache using standard cgi...it will be slow Rails will work on apache using fastcgi, you have to add it yourself - see below for link Rails (at this moment in time) apparently is fastest using lighttpd with fastcgi and the only reasons that you might have to deal with apache and/or proxy is because you can't shut off apache on that system for some reason or another in which case, you set up proxies in apache to handle each RAILS_ROOT you intend to serve with some other lighter weight web server such as lightty or mongrel or even webrick and since apache is already using port 80, those other lighter weight web servers must necessarily be on different ports. ----
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.
---- http://wiki.rubyonrails.org/rails/pages/Fast+CGI+with+Apache2+and+RHEL+4
Craig
On Sun, 2006-03-12 at 10:33, Michael Metz wrote:
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.
Fastcgi hasn't been updated for a while. It does work with Centos. You can find directions for installing Request Tracker under RHEL with fastcgi here: http://wiki.bestpractical.com/index.cgi?RHEL4InstallGuide and it works equally well with Centos.
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?
I don't know anything about this particular project but there are several reasons to use a reverse-proxy front end. One is to hide the fact that you need different program instances perhaps running under different uids or with conflicting options to serve different parts of a site. Another would be to allow caching of parts of the output generated by the real server. Also, if you have clients connecting over a slow link, using a lightweight proxy can release the memory-intense server connection quickly while dribbling the results back to the client.
On Sun, 2006-03-12 at 12:00 -0600, Les Mikesell wrote:
On Sun, 2006-03-12 at 10:33, Michael Metz wrote:
I don't know anything about this particular project but there are several reasons to use a reverse-proxy front end. One is to hide the fact that you need different program instances perhaps running under different uids or with conflicting options to serve different parts of a site. Another would be to allow caching of parts of the output generated by the real server. Also, if you have clients connecting over a slow link, using a lightweight proxy can release the memory-intense server connection quickly while dribbling the results back to the client.
---- a slow client - that makes sense...I didn't consider that. Does anyone still use dial-up anymore?
;-)
Craig
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?
For the record, our mirrorlist selection program uses fastcgi and lighttpd.
On Sun, 2006-03-12 at 14:58 -0600, Johnny Hughes 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?
For the record, our mirrorlist selection program uses fastcgi and lighttpd.
---- and probably rightly so.
My gather from ruby list is that mod_fastcgi broke with apache-2 and it went neglected for quite some time and now someone has picked it back up and it's modestly functional - at least for ruby (I provided a link earlier in the thread) and eventually should become a standard mod for apache again.
Craig