If you want to build a web server on a local lan or on a single development machine and want to have multipe web sites on the single server using Windows Server (2000/2003) you can set it up much like a normal multihomed server.
You would use the host headers. Since all sites will reside on port 80 you need a method to identify which web site the request is targeting. A server on the open to the internet would simply use the domain name in the host header to determine which site to access. When you are configuring your web site in IIS you have the option to specify the host header and you would usually use to host header entries, one for "mydomain.com" and one for "www.mydomain.com".
Well, for a local development machine or lan, you can configure your network "hosts" file:
C:\Windows\system32\drivers\etc\host
You would place an entry for each name to the web server IP or if it is a single development box, simply set to 127.0.0.1 for localhost. An example would be:
127.0.0.1 localhost
127.0.0.1 anothername
127.0.0.1 www.anothername
127.0.0.1 yetanothersite
127.0.0.1 onemoresite
After this is entered and your network restarted you will be able to access the sites as:
http://anothername
http://yetanothersite
...
You would want to leave off the extention of ".com" since you do not want to override a site on the net.
When configuring the host headers of the web sites in IIS, be sure that you use the name as listed in your host file. You can still use the "www." prefixes also. Just remember not to use extentions and you will have to enter another entry in the hosts file that includes the "www."
Using this method you can setup a web server development machine to mirror your production server except for the extention. Makes development and deployment much easier.
Extra tip: When you are using development tools that use FrontPage extentions, you will usually be prompted for login information to access they site since they will not be local host which is automatically added to IE as being unrestricted. To solve this simply browse in IE to the site (http://mysite/) and then double click on the globe in the IE status bar and then add the name to the "local intranet" section. Now you will not need to enter login information to access the local site from tools using FrontPage Extentions.
** NOTE: If you use this method and are running Windows XP SP1 or later or Windows 2003 Server SP1 or later, you might run into a security issue defined here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;896861I use Windows 2003 Server and chose the first option which is to disable it by:
1. Click Start, click Run, type regedit, and then click OK.
2. In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3. Right-click Lsa, point to New, and then click DWORD Value.
4. Type DisableLoopbackCheck, and then press ENTER.
5. Right-click DisableLoopbackCheck, and then click Modify.
6. In the Value data box, type 1, and then click OK.
7. Quit Registry Editor, and then restart your computer.
This worked great on my system.