8月 172015
 

问题

https  ===>  nginx(443) ===> tomcat(8080)

默认tomcat是不知道用户是通过https的访问访问的443端口的,如何让tomcat知道呢?

1.  nginx上添加http header

2. tomcat 上参考上述设置的http header

注意: protocolHeader默认是空的,必须指定哦,因为https默认端口为443,所以connector的proxyPort可以不设置

3. 如果nginx看到的domain和tomcat看到的domain不同,那么,tomcat 重定向时根据自己看到的domain来重定向就会不符合预期了,这时候,需要通过connector的proxyName来实现

 

参考资料:

https://www.91ri.org/11896.html

 Posted by at 下午 7:25

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据