title: Nginx does redirect, not proxy
body: <p>I want to set up Nginx as a reverse proxy for a https service, because we have a special usecase where we need to "un-https" a connection:</p>
  
  <p><code>http://nginx_server:8080/myserver ==&gt; https://mysecureservice</code></p>
  
  <p>But what happens is that the actual https service isn't proxied. Nginx does redirect me to the actual service, so the URL in the browser changes. I want to interact with Nginx as it was the actual service, just without https.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>server {
      listen 0.0.0.0:8080 default_server;
      location /myserver {
          proxy_pass https://myserver/;
          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
      }
  }
  </code></pre>