Site Logo
The Microsoft Most Valuable Professional (MVP) Program was started in the mid 1990s as a way to recognise those members of the general public who devoted their time and considerable computing skills, on a voluntary basis, to helping users 'in distress' in the various newsgroups hosted by Microsoft. There are now around 1800 MVPs worldwide who actively participate in the Microsoft Technical Newsgroups. Many are IT consultants, some are published authors or technical instructors, and there are those who have no formal training but have an in-depth level of practical experience.
2002-2007
blcurve
Home > Internet Information Services > Virtual Directories Part 3
November 7, 2009

curve
Back
curve
     
  curve   curve  
 

Virtual Directories

When your using IIS to serve web pages what normally happens is you need to have all files which will be accessible over HTTP in the wwwroot folder of the server. What a virual directory will do is enable you to give the impression that a file is in a certain place on the server, when infact it could be somewhere else on the machines hard disk or on another networked system.

This was something I used when creating this site, my actual pages were stored in F:\Site\v2\Beta but I was able to access the files by going to http://localhost/site. There isn't really a need to use virtual directories unless your using content which is spread out.

To create a Virtual Directory you first need to open the IIS Managment Console, you can do this either from Administrative tools or by going to start > run and entering
%SystemRoot%\System32\inetsrv\iis.msc

Now expand either the default web site or ftp site which you wish to ad a virtual directory to, right click on it and select New > Virtual Directory. A wizard will now appear, click next and give your virtual directory an alias (this will be the name used to access the content, servername/alias). Click next and select the directory to point the virtual directory towards. Once you've selected a path and pressed next you will be asked to grant permission on this directory to read, run scripts, execute, write and browse. If you don't need to execute programs, write or browse do not check them. If Directory Browsing is checked it will allow the user to view a list of files in the virtual directory, which isn't always a good thing. Click next again, then finish and your directory has been created. You should now be able to access the content by going to http://localhost/alias_name

Note on an NTFS formatted drive IIS will respect the NTFS ACL restrictions placed on files, depending what your doing you might want to edit file permission or possibly need to add the Internet User Guest Accounts (IUSR_MachineName).

Part 4: Locking down your Server

 
  curve  
curve
 
     
curve
curve

Copyright © 2002-2003, Mark Salloway, All Rights Reserved. All images and product names used within this site are the property of their respective copyright owners and are used as an example. Reproduction of information on this site, in any form, is prohibited without express written permission.

Microsoft is in no way affiliated with, nor offers endorsement of, this site. Members of the MVP program are not employees of the Microsoft Corporation. This site's owner assumes no liability for use of any information provided. Usage of this site's content, links and any downloadable items provided is at your own risk