title: Port number getting stripped out of URL
body: <p>I have an django based website that's presented through gunicorn with nginx as reverse proxy. It's on port 81.The relevant portion of the configuration file looks like this:</p>
  
  <pre><code>upstream elearning_server {
      server localhost:8000;
  }
  
  server {
      listen          81;
  ......
  </code></pre>
  
  <p>If you go to: </p>
  
  <pre><code>http://webaddress:81 
  </code></pre>
  
  <p>the first time after you log in, it removes the port number and fails to connect to the website. If you then put the port number back into the url it works fine.</p>
  
  <p>Has anyone got any suggestions of what I can try to fix this problem.</p>