Forum Moderators: mack

Message Too Old, No Replies

IIS Server With Multiple Domain Names, but different index pages?

is this possible? any help is appreciated =)

         

lebhead

4:24 pm on Oct 17, 2003 (gmt 0)

10+ Year Member



Hi, I was wondering how I would give my server that has only 1 NIC and currently only 1 IP (although I do have a block of IPs available to me) multiple domain names, with each having a unique index page.

For example, I want www.domain1.com and www.domain2.com to point to the same physical IIS server, but go to index1.html and index2.html, respectively.

I believe it's possible, and from what I read it seems to involve HTTP 1.1 headers. I just have no idea how to do it with IIS. Can somebody please either help me or point me in the direction of a tutorial, etc.?

Thank you in advance for any assistance.

Server Details:
-Win 2K
-IIS
-Serving .ASP pages
-1 NIC (no real possibility of getting more)
-Currently it has one IP (but I have a block available to me)

txbakers

5:00 pm on Oct 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes this is done all the time.

In the IIS manager you would add a new website, and point the root directory to the directory of your different files.

Then, you would modify the host headers so that IIS will read the domain name requested, and route the request to the proper folder.

There was a discussion of this in the Technology forum not too long ago, you might want to do a site search on "IIS Server Multiple Sites" or something like that.

lebhead

5:35 pm on Oct 17, 2003 (gmt 0)

10+ Year Member



thanks! i just got it.

now my next question is what browsers are NOT HTTP 1.1 compliant? in other words, which browsers won't the single-IP/different host headers combo work on?

thanks.

txbakers

7:50 pm on Oct 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think all browsers would work, as the host header parsing is done on the server.

However, if ever you use HTTPS you can't use host headers anymore. You'll need a distinct IP for each site.

lebhead

8:27 pm on Oct 17, 2003 (gmt 0)

10+ Year Member



thanks!

i just have one more question... when i set up multiple servers on my IIS server using host heads, it worked fine as www.domian2.com, but if i strip off the leading "www" (so it's just domain2.com), it goes to my default page - domain1.com.

how do i set up IIS so that it recognizes both www.domain2.com AND domain2.com (without the "www")?

fyi, i set up the host header as "www.domian2.com". should i have made it just "domain2.com"?

thanks again! :)

lebhead

9:08 pm on Oct 17, 2003 (gmt 0)

10+ Year Member



nevermind i got it.

i just went to the virtual domain's properties in IIS and clicked on the advanced tab to add the new host header (domain2.com). now it works fine.

thanks for your help though, txbakers.