1
votes

I followed this guide and successfully setup my server which works as follows:

OVER HTTPS

Visitor > Nginx (port 443) > SSL Termination > Varnish (port 80) > Apache (port 8080)

OVER HTTP

Visitor > Varnish (port 80) > Apache (port 8080)

Now when I visit my site on HTTPS, it goes on "endless loop". I get "Page isn't redirecting properly" error on the browser.

I tried to tell Apache to return response on HTTPS as follows:

Added this to my Nginx config:

proxy_set_header X-Forwarded-Protocol $scheme;

Also added this to my .htaccess file:

if ($_SERVER['HTTPS'] !== on) { SetEnvIf X-Forwarded-Protocol https HTTPS=on

What possibly is going wrong? What do I need to configure to come out of the loop?

NOTE: I'm running Varnish 3.0 on Ubuntu 12.04.

1

1 Answers

1
votes

Try leaving Varnish out of the path when using HTTPS

So... instead of ==>>

Visitor > Nginx (port 443) > SSL Termination > Varnish (port 80) > Apache (port 8080)

Just use this ==>>

Visitor > Nginx (port 443) > SSL Termination > Apache (port 8080)