3

I am not able to access my web server I recently set up on Ubuntu AWS EC2 instance:

client:~ user$ curl yyy.yyy.yyy.yyyy
curl: (7) Failed to connect to yyy.yyy.yyy.yyyy port 80: Operation timed out

Apache is up and running at the AWS instance:

ubuntu@server:~$ sudo service apache2 status
* apache2 is running

and the port 80 is opened

ubuntu@server:~$ sudo netstat -plunt | grep apache2
tcp6     0    0 :::80                 :::*                  LISTEN    2968/apache2 

I am not that experienced in setting up web servers so far, but as I know Apache should be accessible right after it was installed. What might be wrong in my case?

4

The web server seems to be listening to the actual port and running, accordingly to your netstat.

You have got to open the firewall rule in the AWS console.

Have a look at this: Authorizing Inbound Traffic for Your Linux Instances

Change SSH from the quoted test to HTTP.

To enable network access to your instance, you must allow inbound traffic to your instance. To open a port for inbound traffic, add a rule to a security group that you associated with your instance when you launched it.

To add a rule to a security group for inbound SSH traffic using the console

In the navigation pane of the Amazon EC2 console, choose Instances. Select your instance and look at the Description tab; Security groups lists the security groups that are associated with the instance. Choose view rules to display a list of the rules that are in effect for the instance.

In the navigation pane, choose Security Groups. Select one of the security groups associated with your instance.

In the details pane, on the Inbound tab, choose Edit. In the dialog, choose Add Rule, and then select SSH from the Type list.

In the Source field, specify the public IP address of your computer, in CIDR notation. For example, if your IP address is 203.0.113.25, specify 203.0.113.25/32 to list this single IP address in CIDR notation. If your company allocates addresses from a range, specify the entire range, such as 203.0.113.0/24.

Choose Save.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.