The subdomain utility is used to manage subdomains through CLI. By using this utility, you can perform the following tasks:
Usage
subdomain <command> <subdomain_name> [
<option_1> [<param>]
[<option_2> [<param>]]
… [<option_N> [<param>]]
Example
The following command creates subdomain sample.example.com on the domain example.com, sets the disk space quota for the subdomain to 1 GB, enables SSI and PHP and SSL support, and creates a separate FTP account with user login name john and password sample for the subdomain.
# ./subdomain --create subdomain -domain example.com -hard_quota 1G -ssi true -php true -ftp_user native -login john -passwd sample -ssl true
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates a subdomain on a specified domain. Required |
To create the subdomain sample on the domain example.com: # ./subdomain --create sample -domain example.com or # ./subdomain -c sample -domain example.com |
|
|
Updates an existing subdomain. Required |
To rename the subdomain from sample.example.com to forum.example.com: # ./subdomain --update sample -domain example.com -new_name forum or # ./subdomain -u sample -domain example.com -new_name forum |
|
|
Removes one or more specified subdomains from a specified domain. Required |
To remove subdomains sample.example.com and forum.example.com from the domain example.com: # ./subdomain --remove -subdomains sample,forum -domain example.com or # ./subdomain -r -subdomains sample,forum -domain example.com |
|
|
Displays information on configuration of one or more specified subdomains. If no subdomain is specified, displays info about all subdomains on a domain. Required |
To view information about all subdomains on the domain example.com: # ./subdomain --info -domain example.com or # ./subdomain -i -domain example.com |
|
|
Displays help on the use of the utility. |
To view the help info on the use of this utility: # ./subdomain --help or # ./subdomain -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies the parent domain to which the subdomain belongs. |
To create a subdomain on example.com: # ./subdomain -c subdom -domain example.com |
|
|
Renames a subdomain. Used with the |
To rename the subdomain from sample.example.com to forum.example.com: # ./subdomain -u subdom -domain example.com -new_name forum |
|
|
Specifies the FTP account to be used on a subdomain. The following modes are available:
Is When used with the |
To set sample.example.com to use a separate FTP account with FTP user login name john: # ./subdomain -u sample -domain example.com -ftp_user native -login john |
|
|
Sets the user login name for subdomain own separate FTP account. Used when the |
To set the user login name for the separate FTP account on subdomain sample.example.com to jane: # ./subdomain -u sample -domain example.com -login jane |
|
|
Sets the user password for subdomain own separate FTP account. Used, when the See additional comments in the Note below the table. |
To set the user password for the separate FTP account on subdomain sample.example.com to ftppass: # ./subdomain -u sample -domain example.com -passwd ftppass |
|
|
Specifies the type of the FTP user password. Is Used, when the See additional comments in the Note below the table. |
To set the type of the FTP user password on sample.example.com to encrypted: # ./subdomain -u sample -domain example.com -passwd_type encrypted |
|
|
Limits hard disk quota. Unlimited if set to Is The hard disk quota limit can only be set if the subdomain uses its own, separate FTP account. |
To set the hard disk quota for forum.example.com to 10 GB: # ./subdomain -u forum -domain example.com -ftp_user native -hard_quota 10G |
|
|
Enables/Disables SSI support. Is |
To enable SSI support on the subdomain forum.example.com: # ./subdomain -u forum -domain example.com -ssi true |
|
|
Enables/Disables PHP support. Is |
To enable PHP support on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -php true |
|
|
Enables/Disables CGI support. Is |
To enable CGI support on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -cgi true |
|
|
Enables/Disables FastCGI support. Is |
To enable FastCGI support on subdomain sample.example.com: # ./subdomain -u sample -domain example.com -fastcgi true |
|
|
Enables/Disables Perl support. Is |
To enable Perl support on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -perl true |
|
|
Enables/Disables ASP support. Is |
To enable ASP support on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -asp true |
|
|
Enables/Disables Python support. Is |
To enable Python support on the subdomain sample.example.com: ./# ./subdomain -u sample -domain example.com -python true |
|
|
Enables/Disables ColdFusion support. Is |
To enable ColdFusion support on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -coldfusion true |
|
|
Enables/Disables Miva support. Is |
To enable Miva support on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -miva true |
|
|
Specifies the subdomains to remove or to display information about. Is used in combination with |
To remove subdomains sample.example.com and forum.example.com from the domain example.com: # ./subdomain --remove -subdomains sample,forum -domain example.com |
|
|
Enables/Disables SSL support. Set to |
To enable SSL support on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -ssl true |
|
|
Enables/Disables using a single directory for storing content accessible through SSL and non-SSL connection. Is |
To enable using a single directory for storing content accessible through SSL and non-SSL connection on the subdomain sample.example.com: # ./subdomain -u sample -domain example.com -same_ssl true |
Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - -passwd_type options.
Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.