Export (0) Print
Expand All
Expand Minimize

Create a Virtual Directory in IIS 6.0

Updated: August 22, 2005

Applies To: Windows Server 2003, Windows Server 2003 with SP1

In most cases, the content you publish to your Web site is located in a home directory on your computer, such as C:\Inetpub\Wwwroot\. However, there might be instances when the content is located in another directory, or even on a remote computer.

To be able to publish content from any directory not contained within your home directory, you must create a virtual directory. A virtual directory is a directory that is not contained in the home directory but appears to client browsers as though it were. You can create a virtual directory by using IIS Manager or by using Windows Explorer.

Requirements

  • Credentials: Membership in the Administrators group on the local computer.

  • Tools: Iis.msc.

Recommendation

As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Run as command to run IIS Manager as an administrator. At the command prompt, type runas /user:administrative_accountname "mmc %systemroot%\system32\inetsrv\iis.msc".

Procedures

To create a virtual directory by using IIS Manager
  1. In IIS Manager, expand the Web Sites folder, and expand the Web site to which you want to add a virtual directory.

  2. Right-click the Web site or folder within which you wish to create the virtual directory, select New, and then click Virtual Directory. The Virtual Directory Creation Wizard appears.

  3. Click Next.

  4. In the Alias box, type a name for the virtual directory. This is the name the user types, and should be short and easy to type.

  5. Click Next.

  6. In the Path box, type the name of the physical directory or click Browse to navigate to the physical directory in which the content for the virtual directory resides.

  7. Click Next.

  8. Under Allow the following permissions, select the check boxes for the access permissions you want to assign to your users, and then click Next.

noteNote
For security purposes, when selecting access permissions, consider allowing only the default Read permission. By restricting permissions in this way, you can mitigate potential attacks against your Web site by malicious users.

  1. Click Finish. The virtual directory is created below the currently selected folder level.

To create a virtual directory by using Windows Explorer
  1. Open Windows Explorer.

  2. Right-click the folder you want to be a virtual directory, and select Sharing and Security.

  3. On the Web Sharing tab, click Share this folder.

  4. On the Edit Alias dialog box, in the Alias box, type the name for the virtual directory.

  5. Under Access permissions, select the check boxes for the type of access you want to assign to the virtual directory.

  6. Under Application permissions, select the check boxes for the type of application access you want to assign to the virtual directory.

  7. Click OK, and then click OK again.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft