I have created a web application in netbeans with a apache tomcat server. I want to be able to acces the server from the web. I am behind NAT, will the project be accessible? From my computer i access the project with http://localhost:8084/equinox/
, from a different network will I be able to access this website if I change localhost with the external IP or is there something more I should do.
Add a comment
|
1 Answer
You will need to make sure the following are true:
Tomcat is bound to an IP address that isn't just localhost. Ie. it must be able to accept remote connections
You configure the NAT to forward an external port to the correct IP address and port that your tomcat is running on
You configure whatever firewall that is in the way to allow TCP traffic to/from this host on that port.
-
-
if you do a
netstat -tan
| grep 8084, you should be able to see if tomcat is listening on
127.0.0.1` (which you don't want) or0.0.0.0
which you probably do want. If the former, you'll need to configure theaddress
part of the HTTP connector in your tomcat config file. See tomcat.apache.org/tomcat-6.0-doc/config/http.html.– growseAug 28, 2012 at 9:22