Subdomains: subdomain.exe

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

 

Syntax

subdomain.exe <command> [<subdomain>] [

<option1><param1>[<param2>…<param n>]

[<option2><param1>[<param2>…<param n>]]

…[<option N><param1>[<param2>…<param n>]]

]

 

Example

The following command line creates the subdomain2.domain1.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 50 MB, and enables the SSI support for this subdomain.

>subdomain.exe --create subdomain2 -domain domain1.com -hard_quota 50 -ssi true

 

Commands

Command

Parameter

Description

Example

--create or -c

<subdomain>

Creates a subdomain on the domain specified by the -domain option.

To create a subdomain on somewhere.com:

>subdomain.exe --create subdomain1 -domain somewhere.com

or

>subdomain.exe -c subdomain1 -domain somewhere.com

--update or -u

<subdomain>

Updates the subdomain belonging to a domain specified by the -domain option.

To update the name of the sub.somewhere.com subdomain with a new one - subnew.somewhere.com:

>subdomain.exe --update sub -domain somewhere.com -new_name subnew

or

>subdomain.exe -u sub -domain somewhere.com -new_name subnew

--remove or -r

<subdomain>

Removes one or more subdomains specified by the -subdomains option from a domain specified by -domain.

To remove subdomain1.somewhere.com from somewhere.com:

>subdomain.exe --remove subdomain1 -domain somewhere.com

or

>subdomain.exe -r subdomain1 -domain somewhere.com

--info or -i

 

Retrieves the information about all subdomains belonging to a specified domain.

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

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

or

>subdomain.exe -i -domain somewhere.com

--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 the parent domain the subdomain in focus belongs to.

To create a subdomain on somewhere.com:

>subdomain.exe --create subdomain1 -domain somewhere.com

-new_name

<new_subdomain>

Changes the name of a subdomain as specified. Cannot be used when creating a subdomain.

To change the existing subdomain1.somewhere.com subdomain name to the new one - subdomain1_new.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -new_name subdomain1_new

-www

true|false

Adds the www prefix to the name of a subdomain. Is set to true by default.

To remove the www prefix for subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -www false

-ftp_user

native|main

If set to native, specifies that the subdomain uses its own FTP user account, and if set to 'main', specifies the use of the FTP user account of the parent domain. Is 'main' by default.

To use a separate FTP account for subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -ftp_user native

-login

<login>

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

To set the login for the FTP user:

>subdomain.exe --update subdomain1 -domain somewhere.com -ftp_user native -login johndoe

-passwd

<password>

Specifies the FTP user password. By default, the password is not set. Can be specified only if the subdomain uses its own FTP account.

To set the new password for the FTP user:

>subdomain.exe --update subdomain1 -domain somewhere.com -ftp_user native -login johndoe -passwd 12345

-hard_quota

<MB>

Restricts the hard disk space used by the subdomain (in MB). If set to 0, means the unlimited disk space. Can be specified if the subdomain uses its own FTP account.

To restrict the use of disk space to 10 MB:

>subdomain.exe --update subdomain1 -domain somewhere.com -ftp_user native -hard_quota 10

-write_modify

true|false

Allows/Prohibits granting to the Plesk 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).

Set to false by default.

Available since Plesk 8.1.1.

To allow Plesk IIS User write and modify files and subfolders in httpdocs/ and httpsdocs/ folders of subdomain subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -write_modify true

 

-sb_publish

true|false

Sets the Publish site with SiteBuilder option. Is set to false by default.

Available since Plesk 7.6.

To select the Publish site with SiteBuilder option for subdomain subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -sb_publish true

-fp

true|false

Enables/disables FrontPage support on the subdomain. Is set to false by default.

To enable FrontPage support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -fp true

-fpauth

true|false

Allows the user to authorize in FrontPage before downloading content via FP . Is set to false by default.

To allow FrontPage authoring on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -fpauth true

-fp_no_index

true|false

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

Default value is false.

If on Virtuozzo, default value is true.

Available since Plesk 8.1.1.

To make FrontPage use IIS Index Service on subdomain1.example.com:

>subdomain.exe -u subdomain1 -domain example.com -fp_no_index false

-ssi

true|false

Enables/disables SSI support on the subdomain. Is set to false by default.

To enable SSI support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -ssi true

-ssi_html

true|false

Enables/disables SSI support for HTML, HTM files on the subdomain. . Is set to false by default.

To enable SSI support for HTML, HTM files on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -ssi_html true

-php

true|false

Enables/disables PHP support on the subdomain. Is set to false by default.

To enable PHP support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -php true

-php_version

4|5

Sets the Version option for the PHP support parameter. Is set to 4 by default.

To select PHP5 support on subdomain subdomain1.somwhere.com:

>subdomain.exe -u subdomain1 -domain somewhere.com -php_version 5

-php_isapi

true|false

Allows to run PHP as an ISAPI extension if set to true. Is set to false by default.

To allow to run PHP as an ISAPI extension on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -php_isapi true

-cgi

true|false

Enables/disables CGI support on the subdomain. Is set to false by default.

To enable CGI support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -cgi true

-perl

true|false

Enables/disables PERL support on the subdomain Is set to false by default.

To enable PERL support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -perl true

-asp

true|false

Enables/disables ASP support on the subdomain. Is set to false by default.

To enable ASP support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -asp true

-miva

true|false

Enables/disables ASP support on the subdomain. Is set to false by default.

To enable Miva support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -miva true

-python

true|false

Enables/disables Python support on the subdomain. Is set to false by default.

To enable Python support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -python true

-coldfusion

true|false

Enables/disables ColdFusion support on the subdomain. Is set to false by default.

To enable ColdFusion support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -coldfusion true

-subdomains or -s

<subdomain [, <…>]>

Specifies the subdomains to remove or to retrieve info about. Is used in combination with --remove and --info options respectively. If the -subdomains option is omitted , the --info command outputs the info on all subdomains existing on the parent domain.

To remove subdomain1.somewhere.com from somewhere.com:

>subdomain.exe --remove -subdomains subdomain1 -domain somewhere.com

To retrieve info about subdomain1.somewhere.com:

>subdomain.exe --info subdomain1 -domain somewhere.com

-hst_type

phys|virt

Specifies the type of hosting used on the subdomain (i.e. physical or virtual). Is set to 'phys' (physical) by default.

Available since Plesk 7.6.

To specify the use of virtual hosting on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com –hst_type virt

-www_root *

<www_root>

Specifies the root directory for a subdomain on subfolder within the %plesk_vhosts%/ domain_name/ httpdocs

folder. Sets /httpdocs by default. Requires concomitant use of the -create_phys option with the false argument.

Available since Plesk 7.6.

To specify the /httpdocs/subdonsubf1 folder as the root directory for subdomain on subfolder subdomain1.somewhere.com:

>subdomain.exe –-create subdomain1 –domain somewhere.com -hst_type virt –www_root /httpdocs/subdonsubf1 -create_phys false

-create_phys *

true|false

Creates the root directory for a subdomain on subfolder within the %plesk_vhosts%/ domain_name/ httpdocs

folder. Sets the subdomain name as the directory's name. Is set to true by default.

To create the /httpdocs/pics folder as the root directory for subdomain on subfolder pics.somewhere.com:

>subdomain.exe –-create pics –domain somewhere.com -hst_type virt

-asp.net

true|false

Enables/disables ASP.NET support on the subdomain. Is set to false by default.

To enable ASP.NET support on subdomain1.somewhere.com:

>subdomain.exe --update subdomain1 -domain somewhere.com -asp.net true

-asp.net_version

1.1|2.0

Specifies the version of Microsoft ASP.NET on the domain. The default value is 1.1.

Available since Plesk 7.6.

To choose version 2.0 of Microsoft ASP.NET on subdomain1.somewhere.com:

>subdomain.exe -u subdomain1 -domain somewhere.com -asp.net_version 2.0

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