I built http://www.lighttpd.net/download/lighttpd-1.5.0-r1857.tar.gz and
I'm trying to follow the instructions at:
http://blog.lighttpd.net/articles/2006/07/18/reverse-proxying-mod_proxy_core
The lighttpd.conf I'm using is below. I've started a Mongrel session at
localhost:3000, and when I browse to http://localhost/proxy, Mongrel
tells me:
Processing SiteController#show_page (for 192.168.1.17 at 2007-05-30 08:58:20) [GET]
Parameters: {"url"=>["proxy"], "action"=>"show_page", "controller"=>"site"}
Completed in 0.74100 (1 reqs/sec) | DB: 0.02960 (3%) | 404 Not Found [http://localhost/proxy]
404 Not Found http://localhost/proxy ???
The proxy-core.rewrite-request should have stripped the /proxy/ header
from the URI.
I've even tried:
"_uri" => ( "^(.*)" => "/" ),
with no effect.
server.username = "lighttpd"
server.groupname = "lighttpd"
server.modules = ( "mod_rewrite",
"mod_alias",
"mod_accesslog",
"mod_proxy_core",
"mod_proxy_backend_http" )
server.errorlog = "/var/log/lighttpd/error_log"
accesslog.filename = "/var/log/lighttpd/access_log"
server.document-root = "/home/www/localhost/"
$HTTP["url"] =~ "^/proxy(/|$)" {
proxy-core.rewrite-response = (
"_uri" => ( "^/(.*)" => "/proxy/$1" ),
)
proxy-core.rewrite-request = (
"_uri" => ( "^/proxy/?(.*)" => "/$1" ),
"Host" => ( ".*" => "localhost:3000" )
)
proxy-core.balancer = "round-robin"
proxy-core.protocol = "http"
proxy-core.backends = ( "localhost:3000" )
proxy-core.max-pool-size = 1
}