The project is deployed in a Tomcat environment with a default port of 8068. You want to switch it to another port.
When starting multiple Tomcat-deployed projects on one server, the startup fails because multiple projects share the same port, causing port conflicts. You need to modify the port.
Modify the port number in the server.xml file in Tomcat installation directory\conf\server.xml.
Open the file in Tomcat installation directory\conf\server.xml using a text editor.
1. To change the port number to 8067, for example, locate the Connector port setting in the server.xml file, modify it as follows, and save the file.
<Connector port="8067" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
2. Restart the Tomcat server.
In scenarios where multiple Tomcat instances need to run simultaneously, port configuration is essential to prevent conflicts.
For example, to modify the port numbers for a second Tomcat instance, locate the server.xml file in the conf directory in the installation folder of the second Tomcat container, and modify the HTTP port, the SHUTDOWN port, and the AJP port.
1. Modify port numbers.
The HTTP port handles HTTP requests, such as browser access. The default port number is 8068. Modify it to 8081 as follows.
<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
The SHUTDOWN port accepts the server shutdown command. The default port number is 8005. Modify it to 8006 as follows.
<Server port="8006" shutdown="SHUTDOWN">
The AJP port listens for requests forwarded from other servers using the AJP protocol. The default port number is 8009. Modify it to 8010 as follows.
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy