将 Tomcat 端口从 8080 更改为 80

发布于 2024-12-29 13:36:50 字数 376 浏览 3 评论 0原文

我正在尝试将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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

薄凉少年不暖心 2025-01-05 13:36:50

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.

岁吢 2025-01-05 13:36:50

转到 server.xml 文件,找到连接器端口,只需将相同端口从 8080 更改为 80,然后重新启动 tomcat 并触发 URL localhost:80您的浏览器将运行 tomcat 并显示 tomcat 的主页。

Go to the server.xml file and there find the connector 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文