Modify the port number when multiple tomcat servers are deployed on the same server. tomcat details
When multiple tomcat servers are deployed on the same server, port numbers conflict. Therefore, you must modify the tomcat configuration file server. xml. Take tomcat 7 as an example.
- First, let's take a look at the main tomcat ports:
<Connector port = "8080" protocol = "HTTP/1.1" connectionTimeout = "60000" redirectPort = "8443" disableUploadTimeout = "false" executor = "tomcatThreadPool" URIEncoding = "UTF-8 "/>
8080 is the HTTP port and 8443 is the HTTPS port.
<Server port = "8005" shutdown = "SHUTDOWN">
8005 indicates the remote service Stop port
<Connector port = "8009" protocol = "AJP/1.3" redirectPort = "8443"/>
8009 is the AJP port, and APACHE can access TOMCAT port 8009 through the AJP protocol.
- To deploy multiple tomcat servers, modify the following three ports:
1. HTTP port. The default value is 8080. Change it to 8081 as follows.
<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="60000" redirectPort="8443" disableUploadTimeout="false" executor="tomcatThreadPool" URIEncoding="UTF-8"/>
2. Remotely stop the service port. The default value is 8005. The value is changed to 8006 as follows.
<Server port="8006" shutdown="SHUTDOWN">......
3. AJP port. The default value is 8009, as shown in the following code: 8010
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />