Tomcat修改端口号

来源:互联网 发布:精确度和准确度的算法 编辑:程序博客网 时间:2024/05/21 09:45


找到安装的根目录例:C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\conf  ;在conf目录下有“server.xml”文件

修改以下红色的“8080”改为自己所需的端口号

<!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <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" />
    --> 

0 0
原创粉丝点击