标签:
需求是这样的,有一个tomcat,是80端口,现在我要通过这个tomcat转发到服务器其他tomcat,其他tomcat的端口不是80.这样做就可以避免这样www.baidu.com:8081的情况。
1
2
3
4
5
6
7
8
9
10
|
< Host name = "www.baidu.com" appBase = "webapps" unpackWARs = "true" autoDeploy = "true" > < Context path = "" docBase = "baidu" reloadable = "true" /> < Valve className = "org.apache.catalina.valves.AccessLogValve" directory = "logs" prefix = "localhost_access_log" suffix = ".txt" pattern = "%h %l %u %t "%r" %s %b" /> </ Host > |
1
2
3
4
5
6
7
8
9
10
|
< Host name = "one.baidu.com" appBase = "webapps" unpackWARs = "true" autoDeploy = "true" > < Context path = "/" docBase = "/test/one/apache-tomcat-8.0.14/webapps/oneBaidu" reloadable = "true" /> < Valve className = "org.apache.catalina.valves.AccessLogValve" directory = "logs" prefix = "localhost_access_log" suffix = ".txt" pattern = "%h %l %u %t "%r" %s %b" /> </ Host >
< Host name = "two.baidu.com" appBase = "webapps" unpackWARs = "true" autoDeploy = "true" > < Context path = "/" docBase = "/test/two/apache-tomcat-8.0.14/webapps/twoBaidu" reloadable = "true" /> < Valve className = "org.apache.catalina.valves.AccessLogValve" directory = "logs" prefix = "localhost_access_log" suffix = ".txt" pattern = "%h %l %u %t "%r" %s %b" /> </ Host >
|
通过一个tomcat端口访问多个tomcat项目 tomcat转发
标签:
原文地址:http://blog.csdn.net/jerome_s/article/details/45895635