I have a http server running on localhost:50001
and a ssl enabled server on localhost:50002
, my root domain is say example.com
lighttpd serves a directory when example.com is requested. I need to forward example.com:50001
and example.com:50002
to localhost:50001
and localhost:50002
.
I am not able to achieve this, I tried config below
&HTTP["host"] == "example.com:50001" {
proxy-core.backends = ("localhost:50001")
}
$HTTP["host"] == "example.com" {
server.document-root = "/var/www/servers/example.com"
}
But that causes an error. I haven't tried configuring for ssl server.