我目前正在尝试找出将所有流量从 apache 转发到通过 https 运行的最佳方式,但它并不总是指向 https
当前设置
Stunnel 终止在端口 8000 上运行的 apache 上的 https varnish 转发 taffic
在清漆中,我已经将重定向用于转发 http 流量,如下所示,但想知道我是否需要类似的东西来处理端口 8000 流量?如果是这样怎么办?
sub vcl_recv {
if ( (req.http.host ~ "^(?i)IP" || req.http.host ~ "^(?i)I{")
&& req.http.X-Forwarded-Proto !~ "(?i)https") {
set req.http.x-Redir-Url = "https://IP" + req.url;
error 750 req.http.x-Redir-Url;
}
}
谢谢