two nginx
first nginx:10097->80 port
second nginx:80 port ->code
then,code get the request url no port, but if no redirect, the url on browser has port 10097
, but if redirect, the port is ignored
is need change nginx proxy port
two nginx
first nginx:10097->80 port
second nginx:80 port ->code
then,code get the request url no port, but if no redirect, the url on browser has port 10097
, but if redirect, the port is ignored
is need change nginx proxy port
say my point:
request arrive first nginx: 10097 port change to 80 port
arrive second nginx : 80 port is default port, be ignored
so, if you want to get the port ,you can modify second nginx like this
it mean pass host and port to code, then you can get port in the code
answer : proxy_set_header Host $http_host;