12.4. Hosting Multiple Web Sites

Problem

You want to host multiple web sites on the same computer.

Solution

Using a graphical user interface

To uniquely identify each web site by IP address:

  1. Start the Web Site Creation Wizard described in the previous recipe.

  2. When the IP Address and Port Settings screen appears, select any unused IP address from the list and continue with the wizard.

  3. Users can now access each site using URLs such as http://172.16.12.50, http://172.15.12.51, and so on. You can also use a DNS server to define friendly DNS names for each site if desired.

To uniquely identify each web site by port number:

  1. Start the Web Site Creation Wizard described in the previous recipe.

  2. When the IP Address and Port Settings screen appears, specify any port number above 1023 and continue with the wizard.

  3. Users can now access each site using an URL such as http://172.16.12.50:8081, http://172.16.12.50:8082, and so on. You can also use a DNS server to define a friendly DNS name for your server, but users will still need to know the port number for each site they want to access, for example http://www.mtit.com:8081, http://www.mtit.com:8082, and so on.

To uniquely identify each web site by host header name:

  1. Start the Web Site Creation Wizard described in the previous recipe.

  2. When the IP Address and Port Settings screen appears, type a unique host header name for the site and continue with the wizard.

  3. Users can now access the web site with host header name www1.mtit.com using the URL http://www1.mtit.com ...

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.