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.

In my IIS 7.5 hosted in a Windows Server 2008 R2 I have several websites with no DNS address assigned. Let's take for instance the site (as named in IIS) with site name mySite. I have for this site the standard binding with no host name.

enter image description here

Suppose that my server IP address is, for instance, 101.22.23.01. Therefore it seems logic to me that in order to access the website, I should place in the address bar of my browser:

[IP_address]/[sitename]

in this case:

101.22.23.01/mySite

but it does not work. Shall I specify something else in the bindings?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You will need to use host headers and create the appropriate DNS records to host multiple websites using the same IP Address.

edit: For example, you will need to create bindings for each site. Create a binding for port 80 and enter the www.mysite.com in the hostname field and create the dns entry (or setup a local hosts file for testing) to point to that IP Addres. Create a second binding for port 80 and enter www.myothersite.com in the hostname field and create the DNS entry.

In other words, you can't access those multiple sites without dns mapping or setting up the sites to bind on another port or IP Address

share|improve this answer
    
Thanks for your answer. However my purpose was to test the sites without creating a DNS record. Assume that all the sites use a different port, there should be some way to access them by using the IP address and let IIS route the request tot he appropriate site... –  CiccioMiami Oct 1 '12 at 14:22
    
if they are using a different port, you get to them by going to the port (mysite.com:81) if it's bound to port 81. hostheaders is the way IIS routes requests if they are bound to the same IP and port. –  Rex Oct 1 '12 at 14:23
    
In theory, you could setup a default page to process any request hitting the server, parse the data after and then redirect the user to the appropriate site.. but I think that's kludgey, prone to failure, and over complicating the issue. –  Rex Oct 1 '12 at 14:25
    
sorry, I edited my question mayeb now it looks more clear –  CiccioMiami Oct 1 '12 at 14:28
    
edit: Based on the picture of the binding, you can just go to 101.22.23.01 and it will go to that site. –  Rex Oct 1 '12 at 14:30
show 2 more comments

You can add host name(mySiteHostName.com) and IP address(101.22.23.01) in the binding.

You need to add entry in your client hosts file. C:\Windows\System32\drivers\etc\hosts file

101.22.23.01 mySiteHostName.com.

Now you can test in client machine without creating dns record.

share|improve this answer
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.