同一台服务器部署多个tomcat时,存在端口号冲突的问题,所以需要修改tomcat配置文件server.xml
- 首先了解下tomcat的几个主要端口:
- 其中8080为HTTP端口,8443为HTTPS端口
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="60000" redirectPort="8443" disableUploadTimeout="false" executor="tomcatThreadPool" URIEncoding="UTF-8"/>
- 8005为远程停服务端口
<Server port="8005" shutdown="SHUTDOWN">
- 8009为AJP端口,APACHE能过AJP协议访问TOMCAT的8009端口
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
** 部署多个tomcat也主要修改这几个端口。 **
- HTTP端口,默认8080,改为8081
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="60000"
redirectPort="8443" disableUploadTimeout="false" executor="tomcatThreadPool" URIEncoding="UTF-8"/>
- 远程停服务端口,默认8005,改为8006
<Server port="8006" shutdown="SHUTDOWN">
- AJ如下P端口,默认8009,这里输入代码"8443" />
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
来源:oschina
链接:https://my.oschina.net/u/152736/blog/718442