I'm having problems getting mod_proxy to properly forward traffic to a different webserver running on the same machine for a predefined subfolder. Ideally domain.com/docs should forward to 127.0.0.1:3000 and all other traffic should stay on domain.com. The rewrite rules here are for a wordpress install that runs on domain.com:
$HTTP["host"] =~ "(^|\.)domain\.com" {
$HTTP["url"] =~ "^/docs" {
proxy.server = ( "" => (( "host" => "127.0.0.1", "port" => 3000 )))
}
$HTTP["url"] !~ "^/docs/(.*)" {
url.rewrite = (
"^/(.*)\.(.+)$" => "$0",
"^/wp/(.*)$" => "$0",
"^/(.+)/?$" => "/index.php/$1"
)
server.document-root = "/mnt/webroot/html"
}
}
I've been beating my head against this for a while now, so any suggestions are welcome.