title: Redirect loop with Nginx SSL termination via Varnish/Apache On Wordpress
body: <p>I have a setup where Apache listens on port 8080 behind Varnish 4 on port 80, but my client needs ssl working on the site so I setup Nginx for SSL termination on port 443 using <a href="https://www.digitalocean.com/community/tutorials/how-to-configure-varnish-cache-4-0-with-ssl-termination-on-ubuntu-14-04" rel="nofollow noreferrer">this guide</a>.</p>
  
  <p>Everything works fine at first on http, but on attempting to load the site on https, scripts required by the site won't load, So I decided to change the site url in <code>Settings &gt; General</code> to an https url, on saving changes, I get a redirect loop error in Chrome.</p>
  
  <p>I couldn't access the site's wordpress dashboard to change the url back so I had to do it via phpmyadmin. But now when the site is accessed via https, the site breaks cause the scripts it requires to render content aren't authenticated.</p>
  
  <p>Someone else has the same issue <a href="https://stackoverflow.com/questions/30152764/varnish-3-0-with-nginx-ssl-termination-on-ubuntu-12-04-endless-loops-issue">here</a> but it doesn't look like it was solved.</p>
  
  <p>How can I have the site on just <code>https</code> without a redirect loop in Chrome?</p>