I am trying to configure lighttpd (v1.5) as a reverse proxy. Gollum is running on port 8080 and I've setup lighttpd.conf as per the following:
$HTTP["url"] =~ "^/wiki.*" {
proxy-core.protocol = "http"
proxy-core.backends = ("127.0.0.1:8080")
proxy-core.rewrite-request = ("_uri" => ("^/wiki(.*)" => "/$1"))
proxy-core.rewrite-response = ("_url" => ("^/(.*)" => "/wiki/$1"))
}
Requests are being forwarded fine, but links are not being rewritten. The situation appears similar to lighttpd 1.5 reverse-proxy to trac in so much as browsing to
http://192.168.1.1/wiki/
loads the page, but without any of it's resources (CSS, etc.) and following a link does not include the /wiki infix, e.g.:
http://192.168.1.1/pages
How do the rewrite rules work in this situation?
?in the request rule is intended to be a/. – Shane Madden Oct 13 '11 at 22:46?was a typo. To confirm, I'd like to be able to browse tohttp://192.168.1.1/wikiwhich is a proxy to a service running onhttp://192.168.1.1:8080. Original URLs on that service are like:http://192.168.1.1:8080/edit/Home, which I'd like rewritten tohttp://192.168.1.1/wiki/edit/Home. – tlvince Oct 14 '11 at 14:38