0

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

Grimlockz
  • 2,541
  • 7
  • 31
  • 38
  • You should provide your complete VCL code and the HTTP trace of a request noy being redirected (better accompanied by corresponding varnishlog output) – NITEMAN Nov 08 '13 at 11:41
  • I don't fully understand the question. Can you explain the steps in a little more depth, or in more verbose language? – chmac Jan 13 '14 at 16:00

0 Answers0