12.5. Creating Virtual Directories

Problem

You want to create a virtual directory for a web site.

Solution

Using a graphical user interface

To create a new virtual directory using a wizard, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the Web Sites node under the server node.

  3. Right-click on the node for the web site you want to configure, select New Virtual Directory to start the Virtual Directory Creation Wizard, and click Next.

  4. Specify an alias for your virtual directory and click Next.

  5. Specify the absolute path (for a local virtual directory) or UNC path (for a remote virtual directory) to the folder or share where the content is located and click Next.

  6. Specify web permissions to control access to your virtual directory and click Next, then Finish.

To create a virtual directory using a previously saved configuration file, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the Web Sites node under the server node.

  3. Right-click on the node for the web site you want to configure and select New Virtual Directory (from file).

  4. Specify the path to the XML file containing the saved IIS configuration, click Read File, select the virtual directory you want to import, and click OK.

  5. If the saved configuration was password protected when it was created, you'll be prompted here for a password; enter it, and click OK.

To create a virtual directory using Windows Explorer, do the following:

  1. Open Windows Explorer, right-click ...

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.