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'm really pulling my hair out here over here trying to get my domain pointed to my server the way it should. I'm using GoDaddy as my registrar, Amazon EC2 as my host, with a Windows Server 2008 configured with IIS7.

I'm anticipating having a bunch of different webpages hosted on this server so I've set up the file structure by having folders titled mydomain.com and myotherdomain.com sitting in the wwwroot folder.

In IIS7 I've added a new site. I set the physical path to be C:\inetpub\wwwroot\mydomain.com. The type is set at http. The IP address is the Elastic IP Address that I've bound to my instance. And the port is 80. The host name is set to mydomain.com

I know that after I create the site I then need to go and "Edit Bindings". When I go view the Site Bindings everything is already set to: Type: http Host Name: mydomain.com Port: 80 IP Address: My Elastic IP Address

So I don't change any of those settings. (But when I do click "close" the "X" gets removed from the icon on my site in IIS.)

In GoDaddy I have an A record that has a Host of @ and Points to My Elastic IP I also have a CNAME record that has a Host of www and that points to @

Alright... so doing all of this kinda works. When I go to www.mydomain.com I do end up on my server... but not in the "wwwroot/mydomain.com/" folder. I end up just at the "wwwroot/" folder! How do I get traffic coming from mydomain.com to go to the "wwwroot/mydomain.com/" folder!

I do also have the "Default Web Site" set up. I have read in places that I should get rid of that but I was hoping to keep it so that phpmyadmin could only be accessible by me by navigating to... my.elastic.ip.address/phpmyadmin. The http bindings for the Default Website are Host Name: {blank} Port: 80 IP Address: *

Any help you could give would be really really appreciated!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Your requests are apparently being served by the default site.

I'm not sure why you're worried about keeping the default site in place for phpmyadmin.. but, the host headers should work correctly if you configure your listener addresses to match.

Set your new site's IP binding to *, matching the default site.

share|improve this answer
    
I got it!!! Here's how I set this up in case other people Google themselves this way. As per Shane's suggestion, the IP for the default website and mydomain.com are set to *. The other thing that I think was happening was that I had the binding's Host Name as "mydomain.com". So when I was going to www.mydomain.com, there was no binding for that so I got sent off to the default site. So now I have two binding entries that are identical except one has a Host Name of "www.mydomain.com" the other has "mydomain.com". –  Steven Jenkins Oct 6 '11 at 1:25

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.