2

I am trying to install apache2 on my EC2 instance.

I did the following steps: Launched an Ubuntu 16.4 instance with security group details

  • http - 80 - anywhere
  • https - 443 - anywhere

Once I login to my instance I did

sudo apt update sudo apt install apache2 

when I type

service apache2 status 

it says that Apache is running

I assumed that after this if I go to my public IP address [xxx.xx.xx.xx] I would see the default apache server page. But I see This site can't be reached.

The process seems pretty straightforward, what am I doing wrong?

2
  • 3
    Does curl -I http://localhost return a 200 status? If yes, I'd check that the host is in a public subnet in your VPC, check if a host-based firewall is blocking the port, etc. Commented Sep 9, 2018 at 1:52
  • show us netstat -plnt. If there's nothing on port 80 and 443 then your apache config must be lame. Commented Sep 10, 2018 at 19:28

1 Answer 1

5

I had this stupid case, it made me reinstall dozens of times. Maybe my Security groups don't allow https://

Replace https:// with http:// if available.

It will work perfectly.

Sign up to request clarification or add additional context in comments.

1 Comment

I had the same problem with newly EC2 instance. You should check your both instance's security group protocol configuration and instance's port itself. Both need to be open.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.