I'm currently trying to work out the best way to forward all traffic from apache to run via https but it doesn't always direct to https
Current setup
Stunnel to terminate https varnish forwarding taffic on apache running on port 8000
IN Varnish I've put a redirect in to forward http traffic as below but wondering if I need to something similar for port 8000 traffic? and if so how?
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;
}
}
Thanks