3

I have a medium EC2 instance that runs Windows 2008 R2. I have installed the web role in order to run IIS on it. I am able to see the default website locally but not from the internet using the Public DNS. I get the message "Cannot connect to Website"

3 Answers 3

6

The first thing you need to do is assign an elastic IP address to your instance.

Next, you need to make sure that the security group assigned to this instance has whatever port is added for inbound connections for whatever port you have created the website on(80, 443, etc.).

You also want to make sure that this port is open on your Windows firewall.

4
  • The elastic IP is not a requirement. You can use the default IP address given. Sep 19, 2012 at 16:26
  • Which default IP?
    – boburob
    Sep 19, 2012 at 16:31
  • 4
    By default, every EC2 instance is given a Public DNS name such as ec2-xx-xxx-xx-xxx.compute-1.amazonaws.com. You can access your EC2 instance by putting that DNS name into your web browser. You can also use the IP address that the DNS name resolves to. Beware, this DNS name and IP address will change if you stop and restart your EC2 instance. Sep 19, 2012 at 17:09
  • @MattHouser I never knew this! Thanks for saving me some money!
    – boburob
    Sep 20, 2012 at 7:27
2

Because this is still relevant and confusing as ever, here is what I had to figure out. Using the accepted answer, also make sure you assign your security groups to your instance. You do this by using the Actions menu for the selected Instance.

0

If you forgot to open Widows firewall and port 80 for HTTP during installation, you can always to it EC2 management console under

NETWORK & SECURITY > Security Groups > Edit inbound rules Add rule for HTTP (automatically assigns to port 80 and use 0.0.0.0/0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .