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 want to set up more than one web site on IIS7 with each website having it's own IP address.

This is so that I can set up different domain names within an intranet to point to different web sites. Does anyone know of a way to do this?

If this is not possible, or if there is a better way, do let me know.

My first attempt using a different method involved making the host names within IIS different and then editing the HOSTS file appropriately. This enabled me to navigate to multiple websites on the host machine. However, I could not do the same from other machines on the network.

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

If there's a reason for you NOT to do it the way I'm about to suggest please let me know and I can adjust my advice. However...

On your IIS box set up all your webs using host headers, they can all be the same IP address. Then in your DNS make sure your internal view resolves all of those domains to that IP. Use DNS internally, not the hosts file - that should solve your problem.

share|improve this answer
    
Just a bit of clarification as to why I chose this answer. I talked to my system admin guy (network admin guy is on leave which is why we had this problem) and turns out we DO have an internal DNS server! So, we pretty much did what you suggested after a bit more digging on the net for specifics. Turns out, we didn't need the HOSTS file at all. –  Andrew Dec 17 '09 at 0:30
add comment

If you aren't running an internal DNS server, you will have to put the same host file entries into each of the computers that you want to access those sites from. If you are running an internal DNS server, then you can add 'A' records to allow the client machines to lookup the host names.

There is nothing wrong with they way you have it set up - especially if you plan on using SSL.

An alternative if you don't plan on needing SSL is to use host headers to host multiple websites off one IP (Called VirtualHosts in Apache speak)

share|improve this answer
    
+1 I should have thought about the "not hosting DNS" situation. –  Dave Holland Dec 16 '09 at 4:10
add comment

It sounds as if you have already completed the first step correctly with different host names leading to separate web sites locally on the machine.

The remaining step is to create an entry in Active Directory, or whatever DNS you are using locally to for name lookup.

If everyone is using an external DNS - on your ISP for example, it will be first necessary to set up a local DNS server in which you can create names just for the intranet.

share|improve this answer
add comment

The other answers are great - If you don't have internal DNS, you will need to edit the host file of each.

As for the multiple IP's. There are ways around having to use multiple IP's. Even if you are using SSL , you can use a multi-domain certificate , some call it a unified messaging ssl. Another option is to use a wildcard certificate, but I don't really care for these.

In IIS7 - adding host header's has changed. To get to it, under the Sites tree, select the site you want to edit. In the Actions pane, click Bindings (also in the right click menu). You can then click edit to change a pre-existing binding or add a new one. In this next screen you will be able to enter a hostname.

*Note, if you want your site to load both domain.com and www.domain.com , you will need to add both of these if you are hosting multiple sites using this method

Here is a technet article talking about how to set up host headers in IIS7. I made my instructions follow these a bit.

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.