Subdomains: subdomain.exe

The subdomain.exe utility is designed to manage subdomain accounts. The utility allows the following:

 

Location

%plesk_cli%

Usage

subdomain.exe <command> [<subdomain 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 sample.example.com subdomain in the /httpdocs directory (once not specified explicitly, the default root directory is used), sets the disk space quota for this subdomain to 250 MB, and enables the SSI support for this subdomain.

>subdomain.exe --create sample -domain example.com -hard_quota 250M -ssi true

 

Commands

Command

Parameter

Description

Example

--create or -c

<subdomain name>

Creates a subdomain on the specified domain.

Requires -domain option.

To create the subdomain sample on the domain example.com:

>subdomain.exe --create sample -domain example.com

or

>subdomain.exe -c sample -domain example.com

--update or -u

<subdomain name>

Updates the subdomain belonging to a specified domain.

Requires -domain option.

To update the name of the sample.example.com subdomain with a new one - forum.example.com:

>subdomain.exe --update sample -domain example.com -new_name forum

or

>subdomain.exe -u sample -domain example.com -new_name forum

--remove or -r

 

Removes one or more subdomains from a specified domain.

Requires -subdomains and -domain options.

To remove forum.example.com from example.com:

>subdomain.exe --remove -subdomains forum -domain example.com

or

>subdomain.exe -r -subdomains forum -domain example.com

--info or -i

 

Retrieves the information about subdomains belonging to a specified domain.

Requires -subdomains and -domain options.

If the -subdomains option is omitted, outputs the info on all subdomains existing on the parent domain.

To retrieve the info about all subdomains of example.com:

>subdomain.exe --info -domain example.com

or

>subdomain.exe -i -domain example.com

To retrieve the info about the subdomain sample on example.com:

>subdomain.exe --info -domain example.com -subdomains sample

--help or -h

 

Displays help on the use of the utility.

To see the help info on the use of this utility:

>subdomain.exe --help

or

>subdomain.exe -h

 

Options

Option

Parameter

Description

Example

-domain or -d

<domain name>

Specifies a parent domain for a subdomain.

To create the subdomain forum on the domain example.com:

>subdomain.exe --create forum -domain example.com

-new_name

<new_subdomain>

Changes the name of a specified subdomain.

To rename subdomain from sample.example.com to the forum.example.com:

>subdomain.exe --update sample -domain example.com -new_name forum

-www

true|false

Adds/Deletes the www prefix to/from the subdomain name.

Is true by default.

To remove the www prefix from sample.example.com:

>subdomain.exe --update sample -domain example.com -www false

-ftp_user

native|main

Specifies the type of the FTP user account which is used for managing subdomain.

If it is set to native, subdomain own FTP user account is used.

If it is set to main, FTP user account of the parent domain is used.

Requires -login and -passwd options, if it is set to native.

Is main by default.

To use a separate FTP account with login name John and password sample for managing forum.example.com:

>subdomain.exe --update forum -domain example.com -ftp_user native -login John -passwd sample

-login

<login>

Specifies the FTP user login.

Can be specified only if the subdomain uses its own FTP account.

To set the login name JohnDoe for the FTP user:

>subdomain.exe --update photo -domain example.com -ftp_user native -login JohnDoe -passwd sample

-passwd

<password>

Specifies the FTP user password.

Is not set by default.

Can be specified only if the subdomain uses its own FTP account.

To set the password sample for the FTP user with login name JohnDoe:

>subdomain.exe --update photo -domain example.com -ftp_user native -login JohnDoe -passwd 12345

-hard_quota

<number>[K|M|G]

Limits the amount of disk space used by a subdomain.

Unlimited if set to 0.

Can be specified if the subdomain uses its own FTP account.

To restrict the disk space available for subdomain photo.example.com to 100 MB:

>subdomain.exe --update photo -domain example.com -ftp_user native -hard_quota 100M

-write_modify

true|false

Allows/Prohibits granting to the Parallels Plesk Panel IIS User the full access permission for the subdomain httpdocs/ and httpsdocs/ files and subfolders.

May be required for web applications correct functioning, but is insecure.

Is false by default.

Available since Plesk 8.1.1.

To allow Parallels Plesk Panel IIS User write and modify files and subfolders in httpdocs/ and httpsdocs/ folders of subdomain sample.example.com:

>subdomain.exe --update sample -domain example.com -write_modify true

 

-sb_publish

true|false

Allows/Prohibits publishing site with Sitebuilder.

Is false by default.

Available since Parallels Plesk Panel 7.6.

To allow publishing site with Sitebuilder for subdomain sample.example.com:

>subdomain.exe --update sample -domain example.com -sb_publish true

-fp

true|false

Enables/Disables FrontPage support on a subdomain.

Is false by default.

To enable FrontPage support on the subdomain sample.example.com:

>subdomain.exe --update sample -domain example.com -fp true

-fpauth

true|false

Allows/Prohibits FrontPage authoring before downloading content via FrontPage.

Is false by default.

To allow FrontPage authoring on sample.example.com:

>subdomain.exe --update sample -domain example.com -fpauth true

-fp_no_index

true|false

Defines whether FrontPage uses native WAIS search engine, or IIS Index Server for indexing web sites.

Is false by default.

If on Virtuozzo, is true by default.

Available since Parallels Plesk Panel 8.1.1.

To make FrontPage use native WAIS search engine on sample.example.com:

>subdomain.exe -u sample -domain example.com -fp_no_index true

-ssi

true|false

Enables/Disables SSI support on the subdomain.

Is false by default.

To enable SSI support on sample.example.com:

>subdomain.exe --update sample -domain example.com -ssi true

-ssi_html

true|false

Enables/Disables SSI support for HTML, HTM files on the subdomain.

Is false by default.

To enable SSI support for HTML, HTM files on sample.example.com:

>subdomain.exe --update sample -domain example.com -ssi_html true

-php

true|false

Enables/Disables PHP support on the subdomain.

Is false by default.

To enable PHP support on sample.example.com:

>subdomain.exe --update sample -domain example.com -php true

-php_version

4|5

Sets the PHP version on the subdomain.

Is 4 by default.

To select PHP5 support on the subdomain sample.example.com:

>subdomain.exe -u sample -domain example.com -php_version 5

-php_isapi

true|false

Enables/Disables running PHP as an ISAPI extension.

Is false by default.

Deprecated since Parallels Plesk Panel 8.3. Use -php_handler_type instead.

To enable running PHP as an ISAPI extension on subdomain sample.example.com:

>subdomain.exe -u sample -domain example.com -php-isapi true

-php_handler_type

<cgi|fastcgi|isapi>

Sets PHP support mode.

Is cgi by default.

To enable running PHP as an ISAPI extension on the subdomain sample.example.com:

>subdomain.exe --update sample -domain example.com -php_handler_type isapi

-cgi

true|false

Enables/Disables CGI support on the subdomain.

Is false by default.

To enable CGI support on sample.example.com:

>subdomain.exe --update sample -domain example.com -cgi true

-perl

true|false

Enables/Disables PERL support on the subdomain.

Is false by default.

To enable PERL support on the subdomain sample.example.com:

>subdomain.exe --update sample -domain example.com -perl true

-asp

true|false

Enables/Disables ASP support on the subdomain.

Is false by default.

To enable ASP support on the domain sample.example.com:

>subdomain.exe --update sample -domain example.com -asp true

-miva

true|false

Enables/Disables ASP support on the subdomain.

Is false by default.

To enable Miva support on sample.example.com:

>subdomain.exe --update sample -domain example.com -miva true

-python

true|false

Enables/Disables Python support on the subdomain.

Is false by default.

To enable Python support on sample.example.com:

>subdomain.exe --update sample -domain example.com -python true

-coldfusion

true|false

Enables/Disables ColdFusion support on the subdomain.

Is false by default.

To enable ColdFusion support on sample.example.com:

>subdomain.exe --update sample -domain example.com -coldfusion true

-subdomains or -s

<subdomain[,<…>]>

Specifies the subdomains to remove or to retrieve info about.

Required with --remove and --info.

If the -subdomains option is omitted, the ---info command outputs the info on all subdomains existing on the parent domain.

To remove sample.example.com and photo.example.com from example.com:

>subdomain.exe --remove -subdomains sample,photo -domain example.com

To retrieve info about forum.example.com:

>subdomain.exe --info forum -domain example.com

-hst_type

phys|virt

Specifies the type of hosting used on the subdomain (i.e. physical or virtual).

Is phys by default.

Available since Parallels Plesk Panel 7.6.

To specify the use of virtual hosting on forum.example.com:

>subdomain.exe --update forum -domain example.com -hst_type virt

-www_root *

<www_root>

Specifies the root directory for a virtual subdomain within the %plesk_vhosts%/domain_name/httpdocs folder.

Is /httpdocs by default.

Requires concomitant use of the -create_phys option with the false argument.

Available since Parallels Plesk Panel 7.6.

To specify the /httpdocs/sampledir folder as the root directory for the virtual subdomain sample.example.com:

>subdomain.exe --create sample -domain example.com -hst_type virt -www_root /httpdocs/sampledir -create_phys false

-create_phys *

true|false

Creates/Doesn't create the root directory for a virtual subdomain within the %plesk_vhosts%/ domain_name/ httpdocs folder.

Is true by default.

To create the /httpdocs/pics folder as the root directory for virtual subdomain pics.example.com:

>subdomain.exe --create pics -domain example.com -hst_type virt -create_phys true

-asp.net

true|false

Enables/Disables ASP.NET support on the subdomain.

Is false by default.

To enable ASP.NET support on sample.example.com:

>subdomain.exe --update sample -domain example.com -asp.net true

-asp.net_version

1.1|2.0

Specifies the version of Microsoft ASP.NET on the subdomain.

Is 1.1 by default.

Available since Parallels Plesk Panel 7.6.

To choose version 2.0 of Microsoft ASP.NET on sample.example.com:

>subdomain.exe -u sample -domain example.com -asp.net_version 2.0

* The option is used only for Parallels Plesk Panel virtual subdomains. By using this option, you can only specify an already existing subfolder in the httpdocs directory.