将 Tomcat 端口从 8080 更改为 80
我正在尝试将tomcat的端口从8080更改为80。到目前为止,我的IIS在端口80上运行,没有任何问题。当我尝试在 Tomcat 的“连接器”中使用 80 时,出现以下错误:
java.net.BindException: Address already in use: JVM_Bind '<'null'>':80 <!-- catalina's log
但 IIS 已禁用,并且 NETSTAT 显示端口 80 的一些连接状态为 TIME_WAIT。我有点困惑。为什么 IIS 使用 80 端口而 Tomcat 不使用?我应该配置另一个属性吗?
谢谢!
(时间:tomcat 6 超过 win 2008 服务器)
I'm tring to change tomcat's port from 8080 to 80. Until now, I'd a IIS running in port 80, without any problems. When I try to use 80 in 'conector' for Tomcat, the following error occours:
java.net.BindException: Address already in use: JVM_Bind '<'null'>':80 <!-- catalina's log
But IIS is disabled, and NETSTAT shows some connections with status TIME_WAIT for port 80. I'm a bit confused. How can IIS use port 80 and Tomcat doesn't? Should I configure another property?
Thanks!
(in time: tomcat 6 over win 2008 server)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Tomcat 说其他人正在使用端口 80。
netstat -ao
会告诉您哪个 PID(查找本地侦听器,我猜大多数 TIME_WAIT 只是浏览器宿醉),任务管理器会让你算出PID是哪个进程。Tomcat is saying someone else is using port 80.
netstat -ao
will tell you which PID that is (look for local listeners, I am guessing most of those TIME_WAIT's are just browser hangovers), and Task Manager will let you work out which process that PID is.转到
server.xml
文件,找到连接器端口
,只需将相同端口从 8080 更改为 80,然后重新启动 tomcat 并触发 URL localhost:80您的浏览器将运行 tomcat 并显示 tomcat 的主页。Go to the
server.xml
file and there find theconnector port
and just change the same port to 80 from 8080 and then restart the tomcat and fire the URL localhost:80 in your browser it will run the tomcat and will show the homepage of tomcat.