色粉盒撒娇 发表于 2017-1-6 10:31:00

tomcat read correct request server name behand apache

  I need read requested server name in jsp (tomcat container), because tomcat is behind apache, and apache use proxypass, so the tomcat can only read request.getServerName() got 'localhost'.
  We can pass correct hostname by setting apache configuration: proxyPreserveHost on.
  more infomation see: http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypreservehost
页: [1]
查看完整版本: tomcat read correct request server name behand apache