title: Cannot connect to EC2 web app from external browser
body: <p>Recently I stopped and started my EC2 instance which resulted in having to setup my web app from scratch (using Tomcat &amp; Java).</p>
  
  <p>Right now I have Tomcat running on the EC2 instance and I can properly access my web app by opening a browser on the EC2 server and pointing to <a href="http://localhost:8080/web_app_name" rel="nofollow noreferrer">http://localhost:8080/web_app_name</a></p>
  
  <p>However, if I open a browser on my own PC and point to the public IP of the EC2 instance (e.g. ec2-XXX-XXX-XXX-XXX.ap-southeast-2.compute.amazonaws.com) then the browser returns the message:</p>
  
  <blockquote>
    <p><em>"This site can’t be reached, ec2-XXX-XXX-XXX-XXX.ap-southeast-2.compute.amazonaws.com refused to connect."</em></p>
  </blockquote>
  
  <p>I have checked my security group for this EC2 instance, and it is allowing TCP ports 80, 443, 3389 and 8080 so I'm not sure why I cannot connect to the web app.</p>
  
  <p>How can I resolve this?</p>