开发者

Can't access Tomcat on Unix from another computer

开发者 https://www.devze.com 2023-01-25 20:19 出处:网络
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 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.


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:

<Connector 
    port="8080" 
    protocol="HTTP/1.1" 
    address="127.0.0.1"
    ...

If you find the address attribute, remove it and it should bind to every ip addres (i.e. localhost and 192.168.1.5).

0

精彩评论

暂无评论...
验证码 换一张
取 消