Lighttpd https reverse proxy not working

I have several Tomcats on my server. I use lighttpd to reverse proxy incoming requests for different domains. So far, I've only used http without https, and this configuration worked for me:

$HTTP["host"] == "my.domain.com" {
    proxy.server  = ( "" => ( (
            "host" => "127.0.0.1",
            "port" => 8080
    ) ) )
}

But when I try to do the same and only change the port to https port, I see only a blank page. What do I need to do to redirect traffic to Tomcat that uses https.

+4
source share
1 answer

You need to use $SERVER["socket"], not $HTTP["host"]for example.

$SERVER["socket"] == "my.domain.com:443" {
    proxy.server  = ( "" => ( (
        "host" => "127.0.0.1",
        "port" => 8080
    ) ) )
}
+1
source

Source: https://habr.com/ru/post/1627110/


All Articles