i have a very simple lighttpd config that just forwards with mod_proxy
some requests to different hosts lixe this:
server.modules = ( "mod_proxy", "mod_rewrite" )
server.port = 80
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = "/var/log/lighttpd-err.log"
server.document-root = "/var/www/htdocs/"
$HTTP["url"] =~ "^/simons_app" {
url.rewrite-once = ( "" => "" ) # <= WHAT SHOULD I
WRITE HERE?
proxy.server = ( "" => ( ( "host" =>
"10.0.0.12",
"port" => 3000 )
)
)
}
$HTTP["url"] =~ "^/marks_app" {
url.rewrite-once = ( "" => "" ) # <= WHAT SHOULD I
WRITE HERE?
proxy.server = ( "" => ( ( "host" =>
"10.0.0.15",
"port" => 3000 )
)
)
}
so when a request comes in with an url like
http://www.example.com/marks_app/people
it is forwarded to 10.0.0.15:3000/marks_app/people
this does not work because i get a routing error from the rails app (the
"marks_app" controller does not exist), therefore i''d like to
get rid of
the "marks_app" part in the url before routing the request to the
correct server. can i do this with url.rewrite-once? how?
--
+S2