I have installed apache tomcat 5.5.26. I have successfully installed it and accessed the url: http://localhost:8080
The machine on which I have set it has a static IP: 192.168.2.101 (my router allows dhcp between 2 and 100). I can ping this machine from my laptop (which is on the dhcp) and vice versa.
However, I can not access it from a browser (from my laptop, http://192.168.2.41) when I use the following url: http://192.168.2.101:8080
But when I access it from the machine under consideration (http://192.168.2.101) with the above URL, it opens the default index.html file of apache tomcat
Again when I try to access the same file by using the static ip address assigned to me by the ISP (122.160.114.98) in a browser, it can’t access it: http://122.160.114.98:8080
I don’t know how to configure the system such that what I host on tomcat is accessible from outside and also from other computers on my LAN
Access from another machine on the LAN: check that you have allowed port 8080 through the SUSE firewall.
Access from outside: you need a port forwarding rule at the router. But you have to get the previous problem fixed first.
Accessing the machine’s own IP address from itself is like accessing localhost, the OS knows it as a special case and the packets don’t have to leave the machine.
Forgot, there is another thing you should check and that is if tomcat is only listening on localhost. This is controlled by server.xml IIRC. You can check by
netstat -atn | grep :8080
If the result is *:8080, it is listening on all interfaces, but if it’s 127.0.0.1:8080, you have to edit the config and restart tomcat.
You can specify individual ports that the firewall allows, this is configurable through yast.
from a console as root, type ‘yast firewall’ or start from the gui.
On the left hand side the third option down is allowed services. Select this option, then choose advanced.
Add port 8080 as a tcp allowed port.
Click Ok,
Click Next,
Click Finish.
The firewall rules will now load with port 8080 allowed.