How do I configure Host Headers on IIS 5 on Windows 2000 Server & Advanced Server?
How to configure Host Headers on a Windows 2000 IIS5 Server.
Windows 2000 Professional IIS5 does support Host headers but not using the method described here since the tutorial requires that you can create new web sites which IIS5 professional can not do.
- This tutorial assumes that you have already configured your DNS server to resolve the following DNS names to the IP Address 192.168.0.3
You can use your own domain names instead of the ones I have given above but remember that you need to have your DNS server configured to resolve to the names you will be using.
If you do not have a DNS server you can load the HOSTS file which is in \winnt\system32\drivers\etc folder and enter the following:
- 192.168.0.3 finance.ccrowe.com
- 192.168.0.3 sales.ccrowe.com
- 192.168.0.3 marketing.ccrowe.com
Your hosts file should then look like this.
Note: The hosts file will only work on the machine on which it is configured, if you want to test the host headers from a machine other than the IIS web server machine you will need to duplicate the entries in the hosts file on the test machine as well.
- So first off we need to verify that the name resolution is working.
Ping the 3 DNS names you should see a response similar to above.
- Now that we know that the DNS name resolution is working correctly we need to configure IIS, so for this tutorial we will create 3 new web sites.
- Now create the 3 home folders for the web sites we are going to create.
- Now create 3 simple default.asp files that just say the name of the site and save the relevant version to the relevant folder we just created.
- Welcome to the Finance Web Site
- Welcome to the Sales Web Site
- Welcome to the Marketing Web site
- Load Internet Services Manager from the following locations depending on your version of Windows 2000.
- Windows 2000 Server & Windows 2000 Advanced Server
- [Start Menu] - [Programs] - [Administrative Tools] - [Internet Services Manager]
- Windows 2000 Professional
- [Start Menu] - [Settings] - [Control Panel] - [Administrative Tools] - [Internet Services Manager]
- We first off stop the default web site (this is not required but it makes it simplier for the Tutorial)
- We now create the new web sites, so right click on the [* Computername] node of the tree and select [New]-[Web Site]
- You will be presented with a Wizard which will take us throught the process of creating the web site
- Click the next button and enter a description for the name of the web site, we will do finance first, so enter "Finance Web Site"
- Click the next button you will be presented with a dialog asking for the IP Address, TCP port and Host Header name. Enter the details like below. We first enter the actual IP Address that the DNS name resolves to, and then the TCP port, and then the host header name. the host header name is the name that we created in the DNS manager or the HOSTS file earlier. In the case of the Finance web site it is finance.ccrowe.com
- Click next and enter the path to the finance folder, which is c:\inetpub\sites\finance
- And then finally enter any permissions for the site, the default will be good enough for our tutorial.
- Click the next button and then finish to let the wizard create the web site. IIS 5 will start the web site if it can.
- All we need to do now is repeat the procedure for the other 2 web sites. We only have to change the Description, the Host Header Name, and the physical path to where the files are strored. Just go through the images above and change the details and you will have configured your Host Headers.
- After you have created the 3 web sites it is time to test them out. Simply load 3 copies of your web browser, and enter the DNS names into the address bar.
There you are all done, and quite simple as well. I hope you have no problems trying this out yourself.