General discussion

Locked

Multiple Websites On 1 IP on 1 Server

By gregberry ·
We have w2k server running iis 6, we have two domains, i'll call them domain1.com and domain2.com. We want to host both sites on one server with one ip address. We know this is possible because we have used this setup for about a year. We recently relocated our server from a Co-Location facility to in house. Ever since then it hasn't work. I had to change our IP on our server, but I did not make any changes to the host header information in iis (except for the ip address, which was done automatically).

I tried several different configurations. The way it is configured right now is domain1.com has ip address all unassigned and on port 80 with no hostheader, I have domain2.com setup with ip at all unassigned, port 80 and host header of "domain2.com" (without quotes). I tried setting domain2.com's ip to 192.168.1.5 (which is the lan ip of this server). I also tried setting up a second ip on the nic and setting domain2.com to that then opening the ports up on the router, but that didn't work either.

Any suggestions or ideas?

This conversation is currently closed to new comments.

18 total posts (Page 2 of 2)   Prev   01 | 02
Thread display: Collapse - | Expand +

All Comments

Collapse -

by CG IT In reply to Multiple Websites On 1 IP ...

you didn't read my answer........both domains have to use all unassigned IP port 80 and both have to use host headers.

Name server MUST have BOTH domain names "A" record pointers to your single IP address. Another problem that arises is a Tar record in DNS that isn't updated with new IP to name addresses. If you change your IP address {or your ISP does} and doens't have dynamic update service, the internet wide "Who IS" inquiry on registered name servers won't get updated information on your domain name to IP address resolution.

Note: IIS is sending ALL web request traffic on port 80 to your single web site and will always do so unless host headers are used to distiguish between sites.

Again Microsoft Technet has an article on hosting multiple web sites in IIS with one nic and a single IP address. Article # 324287 How To Use Host Header Names to configure multiple web sites in IIS 6.0 Article # 308163 deals with the same topic for IIS 5.0
Quote off of article # 324287: " Microsoft Internet Information Services (IIS) permits you to map multiple Web sites with the same port number to a single IP address by using a feature called Host Header Names. By assigning a unique host header name to each Web site, this feature permits you to map more than one Web site to an IP address.
"Multiple host names must be mapped to the single IP address by using a DNS server or a Hosts file."

Collapse -

by CG IT In reply to

if IIS is configured that <yourdomain1.com> is using all unassigned IP port 80 with a host header www.<yourdomain1.com> and <yourdomain2.com> is configured to use all unassigned IP port 80 with host header www.<yourdomain2.com> and your not getting any external inbound traffic, then it's a DNS IP to Name resolution problem which would be your ISP.

Collapse -

by gregberry In reply to

Poster rated this answer.

Collapse -

by saaedb In reply to Multiple Websites On 1 IP ...

okie this is how you can host multiple sites on the same server under the same IP.
Make a new site in IIS, lets say you set its Name (Description) to Site1.com, and its URL is www.domainname.com. Sets its IP to be XX.XX.XX.92. click on the advance button under the general tab, and add host headers for it, in the host header add all the URL for this site.

For your second site, make a new site again, call it site2.com(description),keep the same IP for it XX.XX.XX.92, click the advance button under the general tab, and its HostHeaders there, i.e www.AnOtherDomainName.com and so forth.

IN the DNS records for your Sites, point both the URL's to the same server. and let IIS handle it from there :-).

And if you want to hit the sites internaly, then you have to add another step, coz when you host multiple sites on the same server with the same IP, IIS differentiates between the two on the basis of the Hostheaders (DomainName). But internaly when you hit the site, you prolly are hitting it with the Machine Name or the IP for the Machine. In this case IIS can't figure out which one of the two sites you are asking for, coz there is not host header info present in your request, so IIS would pull up the first Site in the list with that IP. If you want to be able to hit the sites internaly as well, then you would need to Add the sites to your internal DNS, and point it to your IIS, and hit the sites with the Domain Name in your internal Server.

Hope all this helps.

Collapse -

by gregberry In reply to

Poster rated this answer.

Collapse -

by Joseph Moore In reply to Multiple Websites On 1 IP ...

Come on here! DR is EXACTLY right on the Host Header configuration, and the non-Domain membership configuration. Don't get on his case about it. IF your web server, as a domain member, is hacked and compromised, then it could be used as a launching pad to attack the REST of your domain, including your Domain Controllers, File Servers, etc. So, think about it.
Anyway, the link to the good Host Header Technet article DR posted is here:

http://support.microsoft.com/?kbid=324287

Go there and READ IT!
"Microsoft Internet Information Services (IIS) permits you to map multiple Web sites with the same port number to a single IP address by using a feature called Host Header Names. By assigning a unique host header name to each Web site, this feature permits you to map more than one Web site to an IP address."

Your attitude toward DR's exactly correct answers to your problem irritated me. Face it: DR was right, and you are wrong!

Sorry for the tough love here, but it is the truth.

Collapse -

by gregberry In reply to

Poster rated this answer.

Collapse -

by gregberry In reply to Multiple Websites On 1 IP ...

This question was closed by the author

Back to Windows Forum
18 total posts (Page 2 of 2)   Prev   01 | 02

Related Discussions

Related Forums