Go back to the Delta Guide Home Page. Download this article as a PDF file.

A020801

Translating Basic Web Site Configurations

Migrating your sites from Apache to IIS relies on your ability to translate your site settings from one machine to another. The IIS 6 Delta Guide book contains details on migrating the majority of settings—but here we're going to look at the specifics of creating different types of Web sites.

Basic Site Setup

To simply create a Web site

  1. Within IIS Manager, select the Web site from the list of different served sites in the panel on the left.

  2. Right-click on the Web site and point to New and select Web Site.

  3. Follow the Web Site Creation Wizard to set the Description, IP Address, TCP port, and Host Header (virtual host) name.

  4. Enter the pathname to the directory you want to hold the information for the Web site or use the Browse button to select the directory.

  5. Set the Web site access permissions.

  6. Click Finish to create and activate the Web site.

Virtual Sites (Name-based)

Name-based virtual sites are those that are defined within Apache using the NameVirtualHost directives. Using named virtual hosts enables one machine with one IP address to host an unlimited number of sites based on the name used to access the machine, not the IP address.

Technically, the way this works is with HTTP Host Headers, where a client sends the name of the host they are accessing before requesting the file they want from the server. Within IIS, therefore, we need to configure the HTTP Host header to configure name-based virtual hosts. You can do this when creating a new site through the Web Site Creation Wizard, or you can set the parameters after a Web site has been created by following these steps:

  1. Within IIS Manager, select the Web site from the list of different served sites in the panel on the left.

  2. Right-click on the Web site and point to Properties.

  3. Select the Website panel.

  4. Click the Advanced button next to the IP Address section.

  5. Now select the IP address row in the existing list of identities for the site and click Edit or Add to add a new IP address/port number/host header information.

  6. Enter the host header (virtual hostname) to the appropriate field.

Virtual Sites (IP-based)

Within Apache, you set the IP address on which to listen for connections and the port number using the BindAddress and Port directives (under Apache 1.3) or using the Listen directive within Apache 2.0. Within IIS, these values are set as part of the basic Web site configuration parameters.

To set the IP address and port number for a Web site

  1. Within IIS Manager, select the Web site from the list of different served sites in the panel on the left.

  2. Right-click on the Web site and point to Properties.

  3. Select the Website panel.

  4. Enter a description for the Web site in Description.

  5. Select the IP address to use for the Web site. If you select All (Unassigned), the Web site will be made available on all configured IP addresses on all configured interfaces. If you select only one address, the Web site will be shared only on that address on all interfaces.

  6. Enter the TCP port to share the Web site on. The default is port 80; other common choices are 1000, 1001, 8008, and 8080.

  7. Click OK to accept the Web site properties.

You can set more complex IP/Port combinations—for example, when configuring different port numbers for different interfaces or IP addresses, by clicking Advanced in the Website panel.

To actually configure additional IP addresses for a given network interface within Windows, you must access the advanced properties of the TCP/IP configuration within the network connection properties for the interface—accessible through the Control Panels.

Virtual Sites (URL-based)

To set up a virtual directory, you only need the directory name and an identification name for the Web site. There is no direct equivalent in Apache, but an IIS Virtual Directory provides the same functionality as a directory redirected to a virtual Web site (by name or IP address).

  1. Within IIS Manager, select the Web site from the list of different served sites in the panel on the left.

  2. Right-click on the Web site and point to New and select Virtual Directory.

  3. The Virtual Directory Creation Wizard will be started.

  4. Click Next to continue the creation of the virtual directory.

  5. Enter an alias to be used to identify the Web site in Alias. The alias must be unique within the Web server.

  6. Click Next to continue the creation of the virtual directory.

  7. Enter the location of the directory that will hold the documents for this Web site or click Browse to select the directory name from within a file browser.

  8. Click Next to continue the creation of the virtual directory.

  9. Select the Access Permissions for the Web site. Read access allows users to access the Web site. Run Scripts will enable ASP script execution within the Web site. Execute will enable ISAPI and CGI scripts. Write will enable remote updating. Browse will allow users to view directory contents.

  10. Click Next to continue the creation of the virtual directory.

  11. Click Finish to continue the creation of the virtual directory.

Migrating User's Home Directory-based Sites

There is no easy way to directly map users to a specific directory that can be automatically shared, as there is within Apache. However, you can set aside a special directory, either to hold all the user's Web sites, or within each user's home directory on the server (if they have one) to be shared within the scope of the main Web server.

To create a new directory for an individual user's Web site

  1. Choose a location for the directory. Using a single directory to hold all the user Web sites is best if you want to easily control the Web sites.

  2. Create a directory to hold the user's Web site.

  3. Right-click on the new directory and choose Properties.

  4. Change to the Sharing panel and share the directory. Enter the name that the Web site will be made available as to the user. Change the User limit to 1, to limit access only to the owner, and then click Permissions and set up the directory to give full privileges only to the user.

  5. Change to the Security tab, and grant access only to the user.

The directory is now ready to use as a user-specific Web directory.

To enable Web sharing for a user directory so that it can be accessed by others

  1. Find the user directory that you created in the previous section.

  2. Right-click on the new directory and choose Properties.

  3. Change to the Web Sharing panel, and click Share This Folder.

  4. Select the Web site under which this directory will be shared.

  5. Click Add to add an alias for this directory within the Web site. In the Alias field, enter the alias for the site. To match the Apache system, use the user's short name prefixed with the tilde character.

  6. Set the Access Permissions for the folder. Click Read to allow people to view the Web site, and Directory Browsing to allow them to browse the Web site contents.

  7. Choose the Application permissions for the directory. To allow only static files, choose None. To allow ASP pages to be used, choose Scripts. To allow CGI and other elements, click Execute.

  8. Click OK to close the Add Alias window.

  9. Click OK to save the Web sharing settings for the directory.


Go back to the Delta Guide Home Page. Download this article as a PDF file.