Lar*_*ars 5 https proxy tomcat forwarding lighttpd
我的服务器上运行着多个 Tomcat。我使用 lighttpd 来反向代理不同域的传入请求。到目前为止,我只使用了 http 而没有使用 https,这个配置对我有用:
$HTTP["host"] == "my.domain.com" {
proxy.server = ( "" => ( (
"host" => "127.0.0.1",
"port" => 8080
) ) )
}
Run Code Online (Sandbox Code Playgroud)
但是当我尝试相同并且仅将端口更改为 https 端口时,我只看到一个空白页面。我需要做什么才能将流量重定向到使用 https 的 Tomcat。
你需要使用$SERVER["socket"]
而不是$HTTP["host"]
例如
$SERVER["socket"] == "my.domain.com:443" {
proxy.server = ( "" => ( (
"host" => "127.0.0.1",
"port" => 8080
) ) )
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
629 次 |
最近记录: |