无法从另一台计算机访问 Unix 上的 Tomcat
我将 Tomcat 6.0 安装到 Fedora 10 中。我可以在浏览器上看到我的 web 应用程序执行一个简单的 http://localhost:8080/来自服务器计算机的 HomeApp。 我通过执行 /sbin/ifconfig 看到我的服务器计算机的 IP 为 192.168.1.5。所以我用服务器IP替换了localhost,它也工作了。
但是,当我转到家里的另一台计算机时,我收到“连接超时”。 这很奇怪,因为我实际上可以从客户端计算机成功 ping 家庭服务器。
任何人都知道出了什么问题吗?我使用此 Verizon Fios 作为默认配置的家庭路由器。 提前致谢。
I installed Tomcat 6.0 into Fedora 10. I'm able to see my webapp on browser doing a simple http://localhost:8080/HomeApp from the server computer.
I saw that my server computer has an IP of 192.168.1.5 by doing /sbin/ifconfig. So I replaced the localhost with the server IP and it was also working.
However when I go to another computer at home I get "Connection timed out".
This is weird because I can actually ping the home server from the client computer successfully.
Anyone knows whats wrong? I'm using this Verizon Fios as my home router with default configurations.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
任何应用程序(本例中为 tomcat)都可以绑定到任何地址或特定地址。我猜你的 tomcat 安装仅绑定到本地主机,这就是你无法从其他主机访问它的原因。
查找 tomcat/conf/server.xml 文件并查找如下文本:
如果找到地址属性,请将其删除,它应该绑定到每个 ip 地址(即 localhost 和 192.168.1.5)。
Any application (tomcat in this case) can bind to any address or to a specific address. I guess your tomcat installation is binded to localhost only, that's why you can't access it from another host.
Look for the tomcat/conf/server.xml file and look for some text like:
If you find the address attribute, remove it and it should bind to every ip addres (i.e. localhost and 192.168.1.5).