问题描述
我在 Windows 7 上运行 Tomcat 5.5 实例(端口 8089).
I'm running a Tomcat 5.5 instance (port 8089) on Windows 7.
如果我打开 http://localhost:8089/,服务器运行正常,但它给我一个错误(连接被拒绝)http://192.168.1.100:8089/
The server runs correctly if I open http://localhost:8089/ but it gives me an error (Connection refused) on http://192.168.1.100:8089/
我认为是防火墙问题,所以我禁用了它,但我仍然没有运气.
I thought it was a firewall issue, so I disabled it, but I still have no luck.
推荐答案
你还需要让Tomcat监听192.168.1.100地址.
You need to make Tomcat listen to 192.168.1.100 address also.
如果您希望它侦听所有接口 (IP-s),只需从配置文件中的连接器字符串中删除address="并重新启动 Tomcat.
If you want it to listen to all interfaces (IP-s) just remove "address=" from Connector string in your configuration file and restart Tomcat.
或者只是使用您的 IP 来侦听连接器字符串中的地址 address=192.168.1.100
Or just use your IP to listen to that address address=192.168.1.100 in the Connector string
这篇关于无法使用IP地址访问Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!