Why can't I access Tomcat externally?

You have to tell the Connector in the server.xml file that you want to use it on every address not only on 127.0.0.1 by changing the address attribute's value to 0.0.0.0

<Connector port="8080" protocol="HTTP/1.1" 
           maxHttpHeaderSize="65536" 
           connectionTimeout="20000" 
           redirectPort="8443"
           address="0.0.0.0" />

Shutdown and startup the tomcat after that

See also: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


Have you actually enabled Tomcat to listen on the eth0 port, rather than just the localhost port. If you can just access it via the localhost (even when you type in the IP addresses it still goes to the local host) but not externally, this is normally the case.

<Host name="www.example.com" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="."/>

Put this after the other host line but before the line, but remember to change the domain to the domain name your are connecting to it by.


For future visitors: I had a similar problem on a Linux server and none of the "solutions" I've found helped.

Finally, I found that I just had firewall settings that blocked that port.