EC2 Linux 2 - Refused to Connect

0

Hello,

I am facing a problem in my Linux 2 EC2 instance. After the httpd is installed and set to start at boot, the docs recommend going to the public DNS to check for the Apache Test Page. However, when I try that, all I get is ERR_CONNECTION_REFUSED and ERR_CONNECTION_TIMEOUT. How do I proceed? I have tried deleting and starting fresh in a new instance. Same problem.

Currest public DNS: https://ec2-3-143-221-217.us-east-2.compute.amazonaws.com/

What do I do?

Thanks in advance.

asked 3 years ago1334 views
5 Answers
0

Hello, Orectique

I would suggest you checking the security group used by your EC2 in order to guarantee that incoming traffic from internet to HTTP (80) or HTTPS (443) are allowed.

SG: Inbound - HTTP/HTTPS - 0.0.0.0/0 or Your Public IP

Note.: Be careful in allowing internet traffic directly to your application/web server.

I hope that can help you.

Have a good one.

answered 3 years ago
0

Hello, Orectique

I would suggest you checking the security group used by your EC2 in order to guarantee that incoming traffic from internet to HTTP (80) or HTTPS (443) are allowed.

SG: Inbound - HTTP/HTTPS - 0.0.0.0/0 or Your Public IP

Note.: Be careful in allowing internet traffic directly to your application/web server.

I hope that can help you.

Have a good one.

answered 3 years ago
0

Hey there,

Thank you for your reply. I have tried the security group inbound rules correction multiple times. It is currently set to ports 22, 80, and 443 at 0.0.0.0/0.

That is the problem. I've done everything as the documentation suggests.

answered 3 years ago
0

Hi Orectique,

From my understanding you would need to go to http://ec2-3-143-221-217.us-east-2.compute.amazonaws.com/ in order to view your public DNS to check for the Apache Test Page (when I did that now it worked). The previous one you were attempting to connect to was HTTPS. If you have not secured your site with an SSL/TLS certificate you can get the error you were.

I hope this helps!

amz99
answered 3 years ago
0

That works. Thank you.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions