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

I am trying to change the entry in HOST file windows 2008 server so that I can host multiple user friendly website for learning purpose.

Find attached an image of my host file and IIS setting. Both "Site1.com" and "Default Web site" point to same folder "wwwroot". But if I type "http:www.site1.com or http://site1.com" will not display anything on browser. Instead if I type http://localhost, the browser displays the default IIS7 html page. How to fix so that I can type site1.com and display II7 default page.enter image description here

enter image description here

share|improve this question

migrated from stackoverflow.com Sep 30 '11 at 10:50

This question came from our site for professional and enthusiast programmers.

    
What have you added for Host Name when editing the bindings for the second web site ("site1.com")? –  Richard Sep 29 '11 at 16:09
    
Its set as www.site1.com –  bp581 Sep 29 '11 at 16:36
add comment

1 Answer

up vote 0 down vote accepted

You need to set the Host Name for the Site1.com site to accept requests for www.site1.com also make sure that site1.com is bound to port 80. Select Bindings... from the Actions/Edit Site section of IIS Manager for the site. You settings should look like the following:

enter image description here

Update: Just noticed that you have your host files entries commented out... Remove the # from the beginning of the lines for www.site1.com and it should work...

share|improve this answer
    
It is set like this ...!!!! –  bp581 Sep 29 '11 at 16:35
    
Thanks for confirming the bindings. Please see update... I believe the issue is related to your hosts file. –  Paige Cook Sep 29 '11 at 16:43
    
Thanks a lot..I un-commented it and it worked ...!!! –  bp581 Sep 29 '11 at 17:49
add comment

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.