Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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"

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
The elastic IP is not a requirement. You can use the default IP address given. –  Matt Houser Sep 19 '12 at 16:26
    
Which default IP? –  boburob Sep 19 '12 at 16:31
3  
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. –  Matt Houser Sep 19 '12 at 17:09
    
@MattHouser I never knew this! Thanks for saving me some money! –  boburob Sep 20 '12 at 7:27

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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