Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This site can’t be reached Amazon Ec2

Tags:

I have created an instance on Amazon EC2 then installed whm and cpnel. I am able to access cpanel just by using my domain name ex. domainname.com/2083 but when i go to my domain mane ex. domainname.com it gives This site can’t be reached...

I am a bit confused if site wasn't pointed properly then it should not go to Cpanel either but since its able to access cpanel then why its not displaying the website.

I have already rechecked name servers and host name.

like image 954
Taha Ibrahim Avatar asked Nov 15 '16 22:11

Taha Ibrahim


People also ask

Why can't I access my EC2 instance?

Verify that your instance is ready Check your instance to make sure it is running and has passed its status checks. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Instances, and then select your instance.

Can't connect to EC2 instance public IP?

To troubleshoot why your Amazon EC2 can't access the internet, do the following: Verify that the EC2 instance meets all prerequisites. Verify that the instance has a public IP address. Verify that a firewall isn't blocking the access.


Video Answer


1 Answers

I was also facing the same issue. while creating the instance it automatically allows port number 22(for SSH connect). Then I follow the following guidelines and install the LAMP stack on my ubuntu 20.0 AMI.

https://usefulangle.com/post/324/aws-ec2-install-linux-apache-mysql-php-phpmyadmin-lamp-stack-ubuntu-20-04

However, you can go to the associated security group of the instance and allow both HTTP and HTTPS rules in the inbound-rules list. The final rule list should be as follow

inbound rules list

But when I again check then it was not working. So I check the URL and it is actually prefixed with HTTPS(Hate part, Google Chrome start hiding the full URL).

As SSL is not installed on the server side so I just remove the HTTPS from the URL and it starts working as expected i.e http://ec2-X-XXX-XXX-XXX.us-east-2.compute.amazonaws.com or by using the Public IPv4 address but without HTTPS.

like image 155
Sachin Kumar Avatar answered Oct 05 '22 18:10

Sachin Kumar