同時啓動兩個tomcat

方法如下



2012-07-03 10:01:28|  分類: windows|字號 訂閱

以下端口 修改爲 未佔用的端口即可 一般8000以上的端口

1.先複製一個新的tomcat

修改一:

大約在22行,找到如下代碼,修改SHUTDOWN端口,默認8005

Xml代碼  
  1. <!-- Note:  A "Server" is not itself a "Container", so you may not  
  2.      define subcomponents such as "Valves" at this level.  
  3.      Documentation at /docs/config/server.html  
  4.  -->  
  5. <Server port="8005" shutdown="SHUTDOWN">  

 

 

修改二:

大約在69行,找到如下代碼,修改HTTP訪問端口,默認8080

Xml代碼  
  1. <!-- A "Connector" represents an endpoint by which requests are received  
  2.      and responses are returned. Documentation at :  
  3.      Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)  
  4.      Java AJP  Connector: /docs/config/ajp.html  
  5.      APR (HTTP/AJP) Connector: /docs/apr.html  
  6.      Define a non-SSL HTTP/1.1 Connector on port 8080  
  7. -->  
  8. <Connector port="8080" protocol="HTTP/1.1"   
  9.            connectionTimeout="20000"   
  10.            redirectPort="8443" />  

 

 

修改三:

大約在90行,找到如下代碼,修改JVM啓動端口,默認8009

Xml代碼  
  1. <!-- Define an AJP 1.3 Connector on port 8009 -->  
  2. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />  

 

 

最後通過bin目錄下startup.bat直接啓動即可。


以上內容來自。http://itbossbaby.blog.163.com/blog/static/11702345220126310128231/



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章