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" />
    -->


相关文章
|
应用服务中间件
tomcat修改默认端口详细步骤(包含运行测试)
在tomcat端口被占用或者需要把默认的8080端口换成其他的端口,就可以修改默认端口。
649 0
tomcat修改默认端口详细步骤(包含运行测试)
|
安全 Java 应用服务中间件
组件漏洞修复---修改SpringBoot内置tomcat的版本号
安全反应Tomcat9.0.41存在安全漏洞,让将所有服务的Tomcat版本升级到9.0.44,我们都知道SpingBoot中是集成的有内置的Tomcat的,叫Embed-Tomcat,这个Tomcat和我们用于部署war包的Tomcat还是有有一些区别的,但是版本一直和Tomcat基本保持一致。
781 0
组件漏洞修复---修改SpringBoot内置tomcat的版本号
|
6月前
|
网络协议 应用服务中间件 Linux
LInux之在同一Tomcat下使用不同的端口号访问不同的项目
LInux之在同一Tomcat下使用不同的端口号访问不同的项目
60 0
|
8月前
|
关系型数据库 MySQL 应用服务中间件
tomcat端口号详解与端口入侵
tomcat端口号详解与端口入侵
78 0
|
9月前
|
XML Java 应用服务中间件
tomcat默认端口号(三个tomcat端口号)
tomcat默认端口号(三个tomcat端口号)
190 0
|
11月前
|
安全 网络协议 应用服务中间件
多个tomcat 同时启动修改完端口号依然冲突问题 无法启动解决
解决方法: 在CMD 中执行 这里不得不介绍下神奇的 netsh winsock reset命令: netsh winsock reset命令,作用是重置 Winsock 目录。如果一台机器上的Winsock协议配置有问题的话将会导致网络连接等问题,就需要用netsh winsock reset命令来重置Winsock目录借以恢复网络。这个命令可以重新初始化网络环境,以解决由于软件冲突、病毒原因造成的参数错误问题。
172 0
|
Java 应用服务中间件 Windows
Tomcat的安装使用,修改默认8080端口号,查询端口号命令
Tomcat的安装使用,修改默认8080端口号,查询端口号命令
183 0
Tomcat的安装使用,修改默认8080端口号,查询端口号命令
|
应用服务中间件
mac下Tomcat的安装,启动和关闭脚本配置,端口号更改
mac下Tomcat的安装,启动和关闭脚本配置,端口号更改
|
Java 应用服务中间件 开发者
修改 tomcat 端口号| 学习笔记
快速学习修改 tomcat 端口号 代理,介绍了修改 tomcat 端口号系统机制, 以及在实际应用过程中如何使用。
175 0
修改 tomcat 端口号| 学习笔记
|
Java 应用服务中间件 容器