How to make Tomcat on AWS EC2 available from outside localhost
11,527
Solution 1
OK, the problem turned out to be that I also needed to edit and restart iptables, as explained here: http://cyberciti.biz/faq/howto-rhel-linux-open-port-using-iptables
Solution 2
Adding what is not mentioned in above answers.
For me, allowing TCP over 8080
was missing.
So, I have created new Inbound rule with following details:
- Type : Custom TCP Rule
- Protocol : TCP
- Port Range : 8080
- Source : Anywhere
This worked for me. Hope it may help someone. :)
Author by
NickChase
Updated on July 20, 2022Comments
-
NickChase almost 2 years
I'm trying to run Tomcat on an AWS Linux server. I've installed Tomcat, and tested it from the command line to make sure it's working, but I can't access it from another machine. The details:
- The instance has port 80 incoming for HTTP open in the security group.
- I have verified that it's running on port 80 by telnetting into localhost on that port and doing a GET request.
- I tried adding the public DNS as an alias for localhost in server.xml then restarting to make sure the changes are picked up.
Yet if I try to access it via my browser (outside the actual server) using the public DNS I get "could not connect".
Any ideas?
Thanks...
-
NickChase almost 13 yearsNo, unfortunately, that's not it. :( That DOES need to be done, but it's not ALL that needs to be done. Thanks, though!
-
thedrs over 11 yearsif you are on windows (i know original question was for linux), don't forget to turn off the windows firewall
-
rams almost 4 yearsThis worked, I was searching for this answer for past 2hrs