The virtdir.exe utility is designed to manage virtual directories on domains. The utility allows the following:
Note: The functionality of virtdir.exe utility is not equal to functionality of Web Directories in Parallels Plesk Panel GUI.
Location
%plesk_cli%
Usage
virtdir.exe <command> [<name>] [
<option 1> <param 1>[,<param 2>,...,<param N>]
[<option 2> <param 1>[,<param 2>,...,<param N>]]
... [<option n> <param 1>[,<param 2>,...,<param N>]]
]
Example
The following command creates the /vd1 virtual directory on example.com as follows: it creates the physical directory in the root directory of the virtual host, maps it to the new virtual directory; allows write access to the contents of the virtual directory (including the source code), disallows read access to these resources, allows viewing the contents of the virtual directory in a browser; disables logging visits on the virtual directory; makes the virtual directory function as a web application (from the standpoint of IIS); disallows running any scripts or executables; sets no default page to display in the browser if no particular page is specified by the user; allows public access to the virtual directory; turns off SSL support for this directory.
>virtdir.exe -c /vd1 -vhost example.com -create_phys true -access_source true -access_read false -access_write true -dir_browsing true -log_visits false -create_app false -execute_perm none -default_doc false -access_anonymous true -require_ssl false
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates a virtual directory with a specified name relative to the domain root directory. |
To create the >virtdir.exe --create /vd1 -vhost example.com or >virtdir.exe -c /vd1 -vhost example.com |
|
|
Updates parameters of a virtual directory. |
To rename the virtual directory from >virtdir.exe --update /vd1 -vhost example.com -name news or >virtdir.exe -u /vd1 -vhost example.com -name news |
|
|
Removes a virtual directory. |
To remove the virtual directory >virtdir.exe --remove /vd1 -vhost example.com or >virtdir.exe -r /vd1 -vhost example.com |
|
|
Retrieves information about a virtual directory. |
To retrieve the info about the virtual directory >virtdir.exe --info /vd1 -vhost example.com or >virtdir.exe -i /vd1 -vhost example.com |
|
|
Displays help on the use of the utility. |
To see the help info on the use of this utility: >virtdir.exe --help or >virtdir.exe -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies a name of a virtual host that owns a virtual directory. Is required in all commands where a virtual directory is specified. |
To enable SSL for the virtual directory >virtdir.exe --update /vd1 -vhost example.com -require_ssl true |
|
|
Allows/Prohibits automatically creating physical directory of the same name for a new virtual directory. Is Is available with |
To prohibit creating the physical directory of the same name for virtual directory >virtdir.exe --create /vd1 -vhost example.com -create_phys false
To allow creating the virtual directory >virtdir.exe --create /vd1/vd2 -vhost example.com -create_phys true |
|
|
Specifies a new name when it is necessary to rename a virtual directory. Is available with |
To rename the >virtdir.exe --update /vd1/vd2 -vhost example.com -name news |
|
|
Specifies a path of a physical directory mapped by a virtual directory. The path is specified relative to the root directory of the domain that owns this physical directory. Is |
To redirect the >virtdir.exe --update /vd1/vd2 -vhost example.com -path / |
|
|
Enables/Disables accessing source code of ASP applications (residing within a specified virtual directory and its non-virtual subfolders) with read/write permissions (if set). Is |
To enable reading scripts of ASP applications of the >virtdir.exe --update /vd1 -vhost example.com -access_read true -access_source true |
|
|
Enables/Disables read access permissions to files located within a specified virtual directory. Is |
To disable read access to files of the virtual directory >virtdir.exe --update /vd1 -vhost example.com -access_read false |
|
|
Enables/Disables write access permissions on files located within a specified virtual directory. Is |
To enable write access permissions on files of the >virtdir.exe --update /vd1 -vhost example.com -access_write true |
|
|
Enables/Disables user to see files and nested directories of a specified virtual directory in a browser. Is |
To enable browsing the structure of the >virtdir.exe --update /vd1 -vhost example.com -dir_browsing true |
|
|
Enables/Disables logging user to visit a specified virtual directory. Is |
To enable logging user to visit the virtual directory >virtdir.exe --update /vd1 -vhost example.com -log_visits true |
|
|
Enables/Disables creating a virtual directory as an IIS application. Is |
To disable creating the virtual directory >virtdir.exe --update /vd1 -vhost example.com -create_app true -run_in_mta false |
|
|
Specifies the execution permission level for files located within a specified virtual directory. If set to If set to If set to |
To restrict the running of executables, but allow all other files of the virtual directory >virtdir.exe --update /vd1 -vhost example.com -execute_perm script |
|
|
Enables/Disables active scripts of a specified virtual directory to use relative paths to access its parent directories (using the .. syntax). If set to Is available with the |
To enable access to parent directories of the virtual directory >virtdir.exe --update /vd1 -vhost example.com -execute_perm none -parent_paths true |
|
|
Enables/Disables running the IIS application (located in a specified virtual directory) in the multithreaded apartment (MTA). Is available with the |
To set the IIS application stored in the virtual directory >virtdir.exe --update /vd1 -vhost example.com -create_app true -run_in_mta false |
|
|
Enables/Disables displaying a default page when a user enters a specified virtual directory with no particular file name specified. If it is set to - if the - if Access forbidden message is displayed. |
To disable displaying a default file and listing the contents for the virtual directory >virtdir.exe --update /vd1 -vhost example.com -dir_browsing true -default_doc false |
|
|
Specifies the prioritized list of default pages for IIS to search within the virtual directory. The first match is displayed. If no match is found, displayed is the list of all files and nested folders in FTP style. The option is available with the |
To specify the default pages list for the virtual directory >virtdir.exe --update /vd1 -vhost example.com -default_doc true -default_doc_order index.html,page1.html |
|
|
Enables/Disables public access to the virtual directory. If |
To restrict access to the virtual directory >virtdir.exe --update /vd1 -vhost example.com -access_anonymous false |
|
|
Enables/Disables SSL access to the virtual directory. If |
To enables SSL access to the virtual directory >virtdir.exe --update /vd1 -vhost example.com -require_ssl true |
|
|
Specifies the PHP version. Is |
To select PHP5 support for the virtual directory >virtdir.exe --update /vd1 -vhost example.com -php_version 5 |
|
|
Specifies the ASP.NET version. Is available with |
To select ASP.NET version 2.0 for web applications located in the virtual directory >virtdir.exe --update /vd1 -vhost example.com -create_app true -asp.net_version 2.0 |
|
|
Limits the size of ASP buffer assigned to a specified virtual directory. Available since Parallels Plesk Panel 8.3. |
To restrict the maximum size of the ASP buffer available for virtual directory >virtdir.exe --update /vd1 -vhost example.com -aspBufferingLimit 1024 |
|
|
Limits the size of ASP request entity body. Available since Parallels Plesk Panel 8.3. |
To restrict the maximum size of ASP request entity body available for the virtual directory >virtdir.exe --update /vd1 -vhost example.com -aspMaxRequestEntityAllowed 3072 |
|
|
Enables/Disables ASP server-side script debugging. If it is a root directory, default value is defined by IIS; else inherited by parent directory. Available since Parallels Plesk Panel 8.3. |
To enable server-side script debugging for the virtual directory >virtdir.exe --update /vd1 -vhost example.com -aspEnableServerDebug true |
|
|
Enables/Disables ASP client-side script debugging. If it is a root directory, default value is defined by IIS; else inherited by parent directory. Available since Parallels Plesk Panel 8.3. |
To enable client-side script debugging for the virtual directory >virtdir.exe --update /vd1 -vhost example.com -aspEnableClientDebug true |