Welcome! Log In Create A New Profile

Advanced

proxy_pass & getServerPort problems

Jiang Web
February 12, 2014 02:52AM
When I use the nginx upstream and proxy_pass to Reverse Proxy the
request. the configuration is:

upstream w3new_cls {
server szxap205-in.huawei.com:9090;
server szxap206-in.huawei.com:9090;
}


server {
listen 80;
server_name w3.huawei.com;

location /NetWeb/ {
proxy_pass http://w3new_cls/NetWeb/;
proxy_redirect off;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

when I access the URL: http://w3.huawei.com/NetWeb and the application
use the <%request.getServerPort%> to get the server port is 9090, Not
the port 80.
But I want to get the port is w3.huawei.com:80, How can I to resovle the
problems.
Thanks for Help.

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_pass & getServerPort problems

Jiang Web February 12, 2014 02:52AM

Re: proxy_pass & getServerPort problems

Francis Daly February 12, 2014 03:10PM

Re: proxy_pass & getServerPort problems

Jiang Web February 12, 2014 08:02PM

Re: proxy_pass & getServerPort problems

Francis Daly February 13, 2014 05:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 112
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready