Nginx: proxx_pass to upstream(xxxx:8080) , but always redirect to 80 Port?
<p>i am almost a fresher to StackOverflow, I thinks i made a clear &amp; well understand title now :)</p>

<p>my original server can access at : localhost:8080. and now i made a nginx proxy which will be accessed from [IP_ADDr]:8088 from outside. But the result it will always redirect my url to [IP_ADDr]:80 that the 404 page present.
below is the config file:</p>

<pre><code> upstream  manage_addr  {
      server   127.0.0.1:8080;
      keepalive 16;
 }

 server {
     listen       8088;
     location / {
        include proxy-opt.conf;
       proxy_pass http://manage_addr;
                access_log  /var/log/nginx/access_log_proxy_http.log;  
        #root   /etc/nginx;
        #index  index.html index.htm;
     }
 }
</code></pre>

<p>below is proxy-opt.conf:</p>

<pre>

    proxy_redirect          off;
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_connect_timeout   30;
    proxy_send_timeout      30;
    proxy_read_timeout      60;
    proxy_buffer_size       4k;
    proxy_buffers           4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    proxy_next_upstream error timeout invalid_header http_503 http_404;
    proxy_max_temp_file_size 0;

</pre>

<p>I found the issue may related with proxy-opt.conf.</p>