Skip to content
Advertisement

can’t connect to ec2 tomcat localhost

I’ve followed a lot of tutorials and questions which been asked before, but still no good (I’m total beginner in ec2)

I’ve did the following: lunched Amazon Linux AMI 2015.09.1 (HVM), SSD Volume Type.

sudo yum install tomcat8-webapps tomcat8-admin-webapps
sudo yum install tomcat8
sudo service tomcat8 start

I’ve added this rule to my security group inbound:

HTTP
TCP
80
0.0.0.0/0

but when I try to browse to: Public DNS:8080

I get:

This webpage is not available: ERR_CONNECTION_TIMED_OUT

I expect to see the tomcat welcome page (as I go to localhost:8080) so I could deploy my war file.

what am I missing?

Thanks.

Advertisement

Answer

If Tomcat itself if running, you need to add a inbound TCP rule for port 8080 in your Security Groups from AWS Console. enter image description here

You may also check if Tomcat is running at port 8080 simply by issuing a

curl localhost:8080

Note: Only open necessary ports for public access because of security reasons.Tomcat GUI Manager also have to be enabled,Do not use the default username/password of tomcat/tomcat. Use a more secure password.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement