re: getServerPort always return 80

2022-01-23 Thread 王 静凯
joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=aoegRGk9NEUdq6K2ks%2FBTeQKyCYiGvm65js%2BsbidLNU%3Dreserved=0 > > > Greetings, > Thomas > > -Ursprüngliche Nachricht- > Von: 王 静凯 > Gesendet: Freitag, 21. Januar 2022 07:26 > An: Tomcat Users List >

re: getServerPort always return 80

2022-01-20 Thread 王 静凯
Hi, any other know this problem? I meet it again today. A server has an Internet IP and when nginx listen to 81,the request.getServerPort() return 80.

re: re: getServerPort always return 80

2022-01-07 Thread 王 静凯
Hi Hua, I have try to modify the access log format of tomcat. Add '%{Host}i' in server.xml like this: Then it print 'domain:10001' in log, so I think nginx has passed the correct host header to tomcat. By the way, I found the valve component 'RemoteIpValve'

Re: getServerPort always return 80

2022-01-04 Thread Christopher Schultz
王 静凯, On 1/4/22 00:46, 王 静凯 wrote: Hi, I use httpServletRequest.getServerPort() to get the port in my jsp. When the tomcat listen 8080 and nginx listen 80. Nginx has set ‘proxy_set_header Host $http_host’. What is the value of $http_host? Then the port 80 mapping to Internet via