Home 一台机器上启动多个Tomcat
Post
Cancel

一台机器上启动多个Tomcat

如果需要在一台机器上启动多个Tomcat服务器,在默认设置下肯定会发生端口冲突。为实现这个效果,只需修改conf子目录中的server.xml文件即可。共需修改三处:

修改http访问端口(默认为8080端口):

1
2
3
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="gb2312"/>

修改Shutdown端口(默认为8005端口):

1
<Server port="8005" shutdown="SHUTDOWN">

修改JVM启动端口(默认为8009端口):

1
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
This post is licensed under CC BY 4.0 by the author.