how to change the port of tomcat

the default port of tomcat is 8080,

when jenkins is binding to the 8080,maybe you want to change another port for tomcat.

so, go to C:\apache-tomcat-8.0.3\conf\server.xml

"C:\apache-tomcat-8.0.3" is the extractive file folder of tomcat.

open the server.xml,and see the following:



    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->


find the codes above, just modify the codes to:

    <Connector port="8081" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8444" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->


Finished

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