On 10/31/06, Sam Livingston-Gray <[EMAIL PROTECTED]> wrote:
My (admittedly quite limited) understanding is that Apache doesn't
serve Rails apps itself, but it can act as a reverse proxy (see also:
pound), dispatching requests to, e.g., dispatch.fcgi or mongrel.  I
believe Dreamhost does this with Apache fronting for FCGI.

FastCGI and reverse HTTP proxying are both valid options, though the
FastCGI module for Apache doesn't have the greatest reputation for
stability.

As I recall, Textdrive has you set up a lighttpd instance on some
dedicated port, and then uses Apache's proxying capabilities to
forward HTTP requests on 80 to your lighttpd port, and then lighttpd
asks one or more dispatch.fcgi instances to process that request.
Seems excessively layered to me, but I'm sure there's a reason,
probably so you can run PHP alongside, or do virtual hosting with
Apache, or something...

Precisely -- one Textdrive system probably hosts a few dozen user
domains, so they use Apache as a secure and stable front-end, and just
proxy requests to each backend account's own lighttpd instance.

That also allows them to give individual hosting customers privileges
to maintain administer "their" lighttpd instance (to restart, switch
RAILS_ENV settings, etc.), without being able to break other
customers' setups if they screw up.

(Mongrel is a much nicer solution to this, IMHO, since it removes the
whole lighttpd layer of the stack without incurring the performance
problems that WEBrick brings with it.)

-Lennon
_______________________________________________
PDXRuby mailing list
[email protected]
IRC: #pdx.rb on irc.freenode.net
http://lists.pdxruby.org/mailman/listinfo/pdxruby

Reply via email to