Tomcat修改端口号

简介: 了解Tomcat修改端口号。

找到安装的更目录例: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" />
    -->



找到安装的更目录例: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" />
    -->




找到安装的更目录例: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" />
    -->



找到安装的更目录例: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" />
    -->



找到安装的更目录例: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" />
    -->


找到安装的更目录例: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" />
    -->


相关文章
|
关系型数据库 MySQL 应用服务中间件
【JavaWeb学习】—如何修改Tomcat的端口号(十)
【JavaWeb学习】—如何修改Tomcat的端口号(十)
|
小程序 Java 应用服务中间件
云服务器上安装配置tomcat并在Tomcat上放置自己写入的一个小程序并添加外网访问端口的教程(超级详细版)
云服务器上安装配置tomcat并在Tomcat上放置自己写入的一个小程序并添加外网访问端口的教程(超级详细版)
235 0
|
2月前
|
Java 应用服务中间件 Linux
tomcat学习二:tomcat部署多个项目:不修改端口和修改端口 两种方式详解
这篇文章详细介绍了在Tomcat服务器上部署多个项目的方法,包括不修改端口和修改端口两种方式。
168 0
|
4月前
|
网络协议 安全 应用服务中间件
在Linux中,Tomcat8005、8009、8080三个端口的含义?
在Linux中,Tomcat8005、8009、8080三个端口的含义?
|
6月前
|
前端开发 Java 应用服务中间件
linux本地检测如何tomcat是否启动成功tomcat端口检测
linux本地检测如何tomcat是否启动成功tomcat端口检测
76 0
|
网络协议 应用服务中间件 Linux
LInux之在同一Tomcat下使用不同的端口号访问不同的项目
LInux之在同一Tomcat下使用不同的端口号访问不同的项目
118 0
|
7月前
原生表格纵向滚动条
原生表格纵向滚动条
|
7月前
|
Java 关系型数据库 MySQL
【Linux】jdk、tomcat、MySQL环境搭建的配置安装,Linux更改后端端口
【Linux】jdk、tomcat、MySQL环境搭建的配置安装,Linux更改后端端口
132 0
|
应用服务中间件 Linux Windows
一台tomcat如何部署多个端口不同的服务?
复制tomcat下webapps文件夹为webapps1 , webapps2 (文件名称无要求 , 需要部署N个项目就复制N-1个文件夹 , 比如部署三个项目 , 再复制两个webapps就行 , 以此类推)
166 0
|
人工智能 监控 Java
IDEA启动tomcat 端口1099被占用(1099 is already in use)
IDEA启动tomcat 端口1099被占用(1099 is already in use)
IDEA启动tomcat 端口1099被占用(1099 is already in use)