http://blog.csdn.net/xzknet/article/details/22672127 (Nginx proxy non-80 port)
Front-end nginx https +tomcat http non-80 port configuration
Nginx adds the following configuration
proxy_set_header Host $host:$server_port; not port 80, $server_port is not required when using port 80
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Tomcat server.xml configuration
<Engine name="Catalina" defaultHost="localhost">
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="X-Forwarded-For"
protocolHeader="X-Forwarded-Proto"
protocolHeaderHttpsValue="https" httpsServerPort="7001"/> When the port is not 80, the httpsServerPort configuration must be added, otherwise the request.getServerPort() method returns 443.
</Engine>