3

I'm fairly new to AWS and I'm trying to create an Amazon Linux server to run PHP code. I'm following the tutorial on AWS, but I can't connect to my server using either the public DNS or IP address. The error I'm getting is "This site can't be reached. Public DNS refused to connect". The instance is currently running, and I've successfully connected to it using puTTy and WinSCP. I double-checked the security group for my server, and I have port 80 open to all IP addresses.

Jordan U.
  • 313
  • 1
  • 5
  • 16
  • Do you have a Web server running on the instance? Did you open the security group? Did you open the firewall on the server's OS? – Mark B Oct 20 '16 at 02:29
  • I followed the instructions to add web server functions to it, and I made the security group. Basically I've followed the instructions up to the point where it asked you to create a php info file, and then navigate to the server. How do you open the firewall? – Jordan U. Oct 20 '16 at 02:53

2 Answers2

8

Log in to AWS - EC2

  1. Go to "NETWORK & SECURITY" -> "Security Groups"
  2. Find the group your instance is a part of
  3. Click on "Inbound"
  4. Add the HTTP port 80
  5. Apply the changes.

Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html

Tan Hong Tat
  • 6,671
  • 2
  • 27
  • 25
-2

Managed to fix it after starting from scratch. Turns out that I needed to make a new vpc to run everything properly.

Jordan U.
  • 313
  • 1
  • 5
  • 16