How to setup folder as IIS Application - Plesk 9

This article applies to:

  • Plesk 9

You may find it necessary to identify a folder as an "application" also known as "IIS Application". This identifies the folder as an application root, which has ramifications on settings for web-based application (ASP or ASP.net files within that folder).  One good example of the impact of changing a folder to an IIS application, is that as the application root, .NET will check for a web.config file there, as explained in the following article:

To set a folder as an IIS Application, follow these instructions:

Note: These instructions ASSUME the physical folder already exists.  i.e. if you want to make www.mydomain.com/myfolder an application, then we're assuming you've already created a physical folder called "myfolder" under your httpdocs directory.

  1. Log into your Control Panel
  2. Click on the Domain
  3. Click on the Web Directories icon (click on the drop down link beside FILE menu)
  4. When the Web Directories screen loads, you are in the website root, illustrated at the top by "/".  "/" equates to the "website root".   The Web Directories page will show all of the physical and virtual folders in the website root.   You need to navigate to the location where your physical folder exists...
  5. If the folder you want to make an application is off the root, you should be able to see it listed on this page... i.e., the physical directory www.mydomain.com/myfolder would show up on the WebDirectories page when viewing the "/" (root) of the site.
  6. If the folder you want to make an application is off a different folder, you should click through the subfolders as necessary until the physical folder is displayed in the list of folders.  For example, if www.mydomain.com/myfolder/hisfolder is the folder you want to make an application, in webdirectories, you would click on the myfolder physical folder to see it's contents, which would include the hisfolder as a subfolder.  Don't click down into "hisfolder", stay a the "myfolder" level.
  7. Now that you've navigated to the correct location, click the ADD NEW VIRTUAL DIRECTORY icon.
  8. On the ADD NEW VIRTUAL DIRECTORY screen:
    Name: put the name of the physical directory we wanted to make an application. In our examples above, we'd either put "myfolder" or "hisfolder".       
    Path: put the path to the physical directory we wanted to make an application. In our examples above, we'd either put "/httpdocs/myfolder" or "/httpdocs/myfolder/hisfolder"
  9. Set virtual directory permissions, if you aren't sure, you typically should ONLY enable "Read Permission" and "Log visits" per the default.  Changing these settings may increase security risks to your site and data. Be sure you understand the ramifications of changing these before you do.

    Application Settings: Check the box to CREATE APPLICATION.
    Execute Permissions: if you're unsure, leave at SCRIPTS ONLY.  Changing these settings may increase security risks to your site and data. Be sure you understand the ramifications of changing these before you do.
  10. Click OK.
  11. You will get an INFORMATIONAL message (not an error) that indicates "Physical directory with such name already exists.  If you continue, it will become inaccessible.  Do you want to proceed?"  Click OK.  The physical folder will become inaccessible, but it will now be accessible by it's virtual name... i.e., it's the same thing, because we set the virtual dir name to the same as the physical dir name.   If you did not get this message, than either the physical directory did not exist BEFORE you started this (as noted at the beginning, we assumed you already had a folder there with this name), or you possible made some other error.  Submit a support request if you need assistance further.
  12. Your "web directory" has now been successfully created.


ADVANCED USER NOTES:

A virtual directory does not have to be set as an IIS application to be usable as a virtual directory.  I.e., all virtual directories are not IIS applications, but all IIS Applications are virtual directories. In Plesk, this is the only way to enable the IIS Application setting on a folder, i.e., to create the virt dir, and enable IIS Application on it.

A virtual directory does not have to be configured to point to a physical folder of the same name; for example, you could create a virtual directory called BOB that pointed to httpdocs/john. It means that the contents of the physical folder httpdocs/john would actually be accessible via the web by www.mydomain.com/BOB; i.e., a virtual folder points to any physical folder you want it to.

 

Was this answer helpful? 23 Users Found This Useful (178 Votes)