Knowledge Essentials - 3Essentials Hosting

How to Setup Virtual Directories in Plesk

Article ID: 1080

 Back to Search

 

Managing Virtual Directories

A virtual directory is an alias for a physical directory on your server hard drive that resides in the domain's home directory. Because an alias is usually shorter than the path of the physical directory, it is more convenient for users to type. The use of aliases is also secure because users do not know where your files are physically located on the server and therefore cannot use that information to modify your files. Aliases also make it easier for you to move directories in your site. Rather than changing the URL for the directory, you change the mapping between the alias and the physical location of the directory.

To manage virtual directories, use the Virtual Directories icon on the Domain Administration page.

Creating a Virtual Directory

To create a virtual directory, follow these steps:

  1. Click Add New Virtual Directory.

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

  3. In the Path box, choose the name of the physical directory in which the virtual directory resides. The path should be relative to the domain's home directory.

  4. Select the Read checkbox to allow users to read or download files or directories and their associated properties.

  5. Select the Write checkbox to allow users to upload files and their associated properties to the enabled directory on your server or to change content in a Write-enabled file. Write access is allowed only when a browser that supports the PUT feature of the HTTP 1.1 protocol standard is used.

  6. Select the Script source access to allow users to access source code if either Read or Write permissions are set. Source code includes scripts in ASP applications.

  7. Select the Directory browsing box to allow users to see a hypertext listing of the files and subdirectories in this virtual directory. Because virtual directories do not appear in directory listings, users must know a virtual directorys alias. If Directory browsing is disabled and the user does not specify a file name, the Web server displays an Access Forbidden error message in the user's Web browser.

  8. The Execute permissions option determines the program execution level allowed for this site's resources.

    Set permissions to None to restrict access only to static files such as HTML or image files.

    Set permissions to Scripts only to allow only scripts to run, not executables.

    Set permissions to Scripts and Executables to remove all restrictions so that all file types can be accessed or executed.

  9. Click OK.

NOTE

While creating a virtual directory, you configure its basic settings. Advanced configuration of a virtual directory is available afterwards, when editing the properties of an existing directory.

Once added, a virtual directory is displayed in the list, accompanied by the status icons that indicate the types of permissions set for the directory. The columns are:

  • R - read permissions.

  • W - write permissions.

  • S - script source access.

  • B - directory browsing.

To set or revoke a specific permission, click the appropriate icon.

To remove a virtual directory, select the corresponding checkbox and click Remove Selected.

Editing Virtual Directories Properties

To adjust a virtual directory settings, click on its name or path in the list of virtual directories.

When you are on the page of a virtual directory properties, you can change its basic configuration described in the Creating a Virtual Directory section. You can also specify the advanced settings:

  • Select the Log visits checkbox if you want the information about visiting the current directory to be logged.
  • Select the Enable parent paths checkbox to allow using double period in the pathname when refering to a folder above the current virtual directory. This makes possible for users moving up the folder tree without knowing the folder name or the whereabouts in the hierarchy.
  • Select the Enable to run in MTA checkbox to allow the application execution in multi-threaded apartment (MTA) mode, that may provide a slight performance boost. If the checkbox is left deselected, the application runs in single-threaded apartment.
  • The Enable default content page checkbox is needed for allowing a default document for the current virtual directory. The default document is sent to a client's browser of user who accesses the directory through the Web without a specific file name (e.g. using http://www.swsoft.com, not http://www.swsoft.com/index.php).If this checkbox is deselected and Directory browsing is enabled, the Web server returns a folder listing. If it is deselected and Directory browsing is disabled, the Web server returns an "Access Forbidden" error message.
  • Specify the names of files that can be used as default documents (e.g. index.html, default.html, index.php etc) in the Default documents in a search order text input field. IIS searches for the default documents in the order you defined when listed the file names, and then operates the first available file it finds. If no match is found, IIS behaves as in the cases when the default content page is disabled.
  • Select the Enable anonymous access checkbox if you want to make the directory public, so that web users could access it without authentication.
  • Select the Require SSL checkbox/ to enable SSL-only access to the directory.

 

 

 
Downloads Associated With This Article
No downloads are currently associated with this article.