'How to serve html page or AMI test page in browser on new amazon ec2 server
I got an Amazon ec2 server and when I go to the URL (Public DNS (IPv4)) in my browser I get "ERR_CONNECTION_TIMED_OUT"
I did the tutorial "Installing a LAMP Web Server on Amazon Linux" http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
But got stuck on "If you are unable to see the Apache test page, check that the security group you are using contains a rule to allow HTTP (port 80) traffic."
I checked the security groups and they both set to "All traffic All All sg-7496280c (default)"
And I still can't see the test page. I've also tried using the public IP address and I get the same thing.
There were no errors when installing packages.
I am able to connect using winSCP and upload html files but it doesn't serve them.
I don't know if I'm doing the right tutorial, or if I need to do other things first, or which tutorials apply to which types of servers or if ec2 and aws are the same thing or not etc.
I tried contacting support but it said I don't get technical support for basic accounts. I tried posting this on Amazon forums but it said something like "you can't post new threads right now, try again later"
I'm only doing any of this because you can't run node.js on hostgator.
Solution 1:[1]
ERR_CONNECTION_TIMED_OUT only happen either your apache not running or your server or your server is redirecting too much
Just I am unsure where you uploaded your HTML file and with what permission. Do the basic thing reinstall only apache first. check in your inbound and outbound port in aws security group in aws dashboard if 80 port is open with anywhere option
check for
security rule
See if apache default page come. then upload your file.
can you tell in what directory you uploaded all your HTML
Solution 2:[2]
"ERR_CONNECTION_TIMED_OUT" can also be happen if you have not properly configure security group while creating the EC2 instance as it allows specific traffic to reach your instance.
If you want to set up a web server and allow Internet traffic to reach your instance, add rules that allow unrestricted access to the HTTP and HTTPS ports.
and copy Public IPV4 and use to visit the webpage rather than copying the url.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Biswajit Mohanty |
Solution 2 | Pranjal Tripathi |