On 16.5.2005, at 04:49, Albert Yi wrote:
> I''ve finally got lighttpd+fastcgi+rails working, and I also got it
> setup with one virtual host (via the simple-vhost module). Now I''m
> wondering if there''s an easy way to setup fastcgi processes for
> different rails apps. The quickest way seems to be using a different
> extension for each rails app, but that seems messy. Is there a
> cleaner, easier solution?
Yes, there is: using conditionals in lighttpd config file:
$HTTP["host"] =~ "admin.domain.tld" {
server.document-root = "/path/to/your/site/a/public"
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = ( ".fcgi" =>
( "first_app" =>
(
"min-procs" => 5,
"max-procs" => 5,
"socket" => "/tmp/site_a.fcgi.socket",
"bin-path" =>
"/path/to/your/site/a/public/dispatch.fcgi"
"bin-environment" => ( "RAILS_ENV" =>
"production" )
)
)
)
}
$HTTP["host"] =~ "domain.tld" {
server.document-root = "/path/to/your/site/b/public"
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = ( ".fcgi" =>
( "second_app" =>
(
"min-procs" => 5,
"max-procs" => 5,
"socket" => "/tmp/site_b.fcgi.socket",
"bin-path" =>
"/path/to/your/site/b/public/dispatch.fcgi"
"bin-environment" => ( "RAILS_ENV" =>
"production" )
)
)
)
}
//jarkko
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails