Pat Maddox
2006-Jan-26 13:03 UTC
[Rails] Run fastcgi in Apache 1.3, or proxy through lighttpd?
I''m working with a guy who has Apache 1.3 installed on his server, and it''s not an option to simply use lighttpd for a Rails application I''m helping him with. I''ve seen that Apache 2 apparently is crappy when it comes to fastcgi, but 1.3 isn''t so bad. I can then either just run my app straight in Apache, or I could proxy it through to lighttpd. Which is a better option in general? Also, if I should go the Apache route, what module should I use? I''ve only used lighttpd to this point on my own. Pat
Ezra Zygmuntowicz
2006-Jan-26 18:26 UTC
[Rails] Run fastcgi in Apache 1.3, or proxy through lighttpd?
On Jan 26, 2006, at 5:03 AM, Pat Maddox wrote:> I''m working with a guy who has Apache 1.3 installed on his server, and > it''s not an option to simply use lighttpd for a Rails application I''m > helping him with. I''ve seen that Apache 2 apparently is crappy when > it comes to fastcgi, but 1.3 isn''t so bad. I can then either just run > my app straight in Apache, or I could proxy it through to lighttpd. > Which is a better option in general? Also, if I should go the Apache > route, what module should I use? I''ve only used lighttpd to this > point on my own. > > Pat >Pat- I would personally recommend that you proxy to lighty from apache. Especially since you already know lighty well it will be easier for you to use. Also you will be able to restart your rails app with out restarting apache. So you can switch to dev or production mode and reload changes without bouncing the whole server. In my tests, you shouldn''t notice much performance difference as proxying is a very quick process. I have a server at work with around 32 client web sites on it under apache1.3. Most of them are php/html sites but about 7 of them are rails sites and each of them runs their own lighty. It runs great and I have had no problems at all using it. Whereas I was always fidgeting with apache/mod_fcgi when I tried to use that, always getting random 500 errors that would never fully go away. Here is my apache1.3 vhost conf that I use that is tried, tested and trueL Apache 1.3.x: <VirtualHost *:80> ServerName example.com ServerAlias www.example.com ProxyPass / http://example.com:8000/ ProxyPassReverse / http://example.com:8000/ </VirtualHost> Cheers- -Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra@yakima-herald.com
Pat Maddox
2006-Jan-26 22:01 UTC
[Rails] Run fastcgi in Apache 1.3, or proxy through lighttpd?
On 1/26/06, Ezra Zygmuntowicz <ezra@yakima-herald.com> wrote:> > On Jan 26, 2006, at 5:03 AM, Pat Maddox wrote: > > > I''m working with a guy who has Apache 1.3 installed on his server, and > > it''s not an option to simply use lighttpd for a Rails application I''m > > helping him with. I''ve seen that Apache 2 apparently is crappy when > > it comes to fastcgi, but 1.3 isn''t so bad. I can then either just run > > my app straight in Apache, or I could proxy it through to lighttpd. > > Which is a better option in general? Also, if I should go the Apache > > route, what module should I use? I''ve only used lighttpd to this > > point on my own. > > > > Pat > > > > Pat- > > I would personally recommend that you proxy to lighty from apache. > Especially since you already know lighty well it will be easier for > you to use. Also you will be able to restart your rails app with out > restarting apache. So you can switch to dev or production mode and > reload changes without bouncing the whole server. In my tests, you > shouldn''t notice much performance difference as proxying is a very > quick process. > > I have a server at work with around 32 client web sites on it under > apache1.3. Most of them are php/html sites but about 7 of them are > rails sites and each of them runs their own lighty. It runs great and > I have had no problems at all using it. Whereas I was always > fidgeting with apache/mod_fcgi when I tried to use that, always > getting random 500 errors that would never fully go away. > > Here is my apache1.3 vhost conf that I use that is tried, tested and > trueL > > Apache 1.3.x: > > <VirtualHost *:80> > ServerName example.com > ServerAlias www.example.com > ProxyPass / http://example.com:8000/ > ProxyPassReverse / http://example.com:8000/ > </VirtualHost> > > Cheers- > > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > http://yakimaherald.com > 509-577-7732 > ezra@yakima-herald.com > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Hey Ezra, Thanks for the advice. My next problem here is that it apparently doesn''t have mod_proxy compiled in. I did lots of googling to see if somehow I could download and build the module independently, then dynamically load it in, but couldn''t find anything. I guess I''d have to recompile Apache to make it happen. This is on a CPanel server though (BLEH!) so I don''t think it''s a simple recompile. Anyway, it''s hosted at servint.com, so he can get those guys to do it for us. If you know how I can just build the module and load it dynamically, I''d really appreciate some pointers. Pat