title: Jenkins + Nginx on my ubuntu server keeps redirecting to app_address:8080
body: <p>I have one staging server for my application which hosts jenkins and my web app.</p>
  
  <p>I'm using nginx and here's the jenkins.conf for it:</p>
  
  <pre><code>server {
      listen 80;
      #listen [::]:80 default ipv6only=on;
      server_name ci.myurl.com;
  
      location / {
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $http_host;
  
          proxy_pass  http://127.0.0.1:8080;
          proxy_read_timeout 90;
          proxy_redirect  http://127.0.0.1:8080 http://ci.myurl.com;
      }
  }
  </code></pre>
  
  <p>The thing is, everytime I go to my browser and type: ci.myurl.com I get redirected to staging.myurl.com:8080 (my app is hosted at staging.myurl.com using port 80).</p>
  
  <p>Everything works okay but I want jenkins to live at ci.myurl.com without redirections.</p>
  
  <p>How can I achieve this?</p>
  
  <p>Thanks a lot!</p>