如何同時啟動多個Tomcat伺服器
阿新 • • 發佈:2019-01-24
conf子目錄中開啟server.xml檔案,查詢以下三處:
(1) 修改http訪問埠(預設為8080埠)
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080"
minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount ="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
(大概在86行左右)將8080修改為第一個tomcat不在使用的埠號。此處所設的埠號即是以後訪問web時所用的埠號。
(2) 修改Shutdown埠(預設為8005埠)
<Server port="8005" shutdown="SHUTDOWN" debug="0">
(大概在13行左右)將8005修改為沒有在使用的埠號,例如8095
(3) 修改JVM啟動埠(預設為8009埠)
< Connector className ="org.apache.coyote.tomcat4.CoyoteConnector"
port ="8009" minProcessors ="5" maxProcessors ="75"
enableLookups ="true" redirectPort ="8443"
acceptCount ="10" debug ="0" connectionTimeout ="20000"
useURIValidationHack ="false"
protocolHandlerClassName ="org.apache.jk.server.JkCoyoteHandler" />
(大概在107行左右)將8009修改為沒有在使用的埠號,例如8099