title: 302 redirect doesn't work behind nginx reverse proxy
body: <p>We are currently switching from Pound to Nginx for our reverse proxy, I have everything working except for one site.</p>
  
  <p>We have a split DNS setup. All of our webservers are behind our firewall. If you are on our network our internal DNS points directly to our webservers. If you are outside our network our external DNS points to our reverse proxy, which forwards traffic through our firewall to the webservers.</p>
  
  <p>We have one site which is of course vendor software (horray!) basically if our users go to <a href="http://abc.foo.com" rel="nofollow noreferrer">http://abc.foo.com</a> the server sends a 302 redirect code and point them to <a href="https://login.vendorsite.com" rel="nofollow noreferrer">https://login.vendorsite.com</a></p>
  
  <p>This redirect works on the inside, but if you connect from the outside the 302 redirect never makes it thorugh nginx. They stay on abc.foo.com and instead a 200 status is returned by Nginx.</p>
  
  <p>We never had this issue with Pound, pound allows the redirect through with no issue.</p>
  
  <p>Here is my current config for nginx:</p>
  
  <pre><code>server {
      listen 80;
      server_name abc.foo.com;
  
      location / {
          proxy_set_header Host &amp;host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_pass http://webserveripaddress;
      }
  }
  </code></pre>