一臺服務器部署多個tomcat端口號修改詳情記錄

同一臺服務器部署多個tomcat時,存在端口號衝突的問題,因此須要修改tomcat配置文件server.xmltomcat

  • 首先了解下tomcat的幾個主要端口:
  1. 其中8080爲HTTP端口,8443爲HTTPS端口
<Connector port="8080" protocol="HTTP/1.1"  connectionTimeout="60000"  redirectPort="8443" disableUploadTimeout="false"  executor="tomcatThreadPool" URIEncoding="UTF-8"/>
  1. 8005爲遠程停服務端口
<Server port="8005" shutdown="SHUTDOWN">
  1. 8009爲AJP端口,APACHE能過AJP協議訪問TOMCAT的8009端口
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

** 部署多個tomcat也主要修改這幾個端口。 **服務器

  1. HTTP端口,默認8080,改成8081
<Connector port="8081" protocol="HTTP/1.1" 
               connectionTimeout="60000" 
               redirectPort="8443" disableUploadTimeout="false"  executor="tomcatThreadPool"  URIEncoding="UTF-8"/>
  1. 遠程停服務端口,默認8005,改成8006
<Server port="8006" shutdown="SHUTDOWN">
  1. AJ以下P端口,默認8009,這裏輸入代碼"8443" />
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
相關文章
相關標籤/搜索