The subdomain utility is used to manage subdomains through CLI. By using this utility, you can perform the following tasks:
Syntax
subdomain <command> <subdomain name> [
<option_1> [<param>]
[<option_2> [<param>]]
…[<option_N> [<param>]]
Example
The following command line creates subdomain subdom.example.com on domain example.com domain, 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 subdomftp and password ftppass for the subdomain.
# ./subdomain --create subdomain -domain example.com -hard_quota 1G -ssi true -php true -ftp_user native -login subdomftp -passwd ftppass -ssl true
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates a subdomain on the domain specified by the |
To create subdomain subdom on domain example.com: # ./subdomain --create subdom -domain example.com or # ./subdomain -c subdom -domain example.com |
|
|
Updates an existing subdomain on a domain specified by the |
To change the name of subdomain subdom.example.com to subdomnew.example.com: # ./subdomain --update subdom -domain example.com -new_name subdomnew or # ./subdomain -u subdom -domain example.com -new_name subdomnew |
|
|
Removes one or more subdomains specified by the |
To remove subdomains subdom1.example.com and subdom2.example.com from domain example.com: # ./subdomain --remove -subdomains subdom1,subdom2 -domain example.com or # ./subdomain -r -subdomains subdom1,subdom2 -domain example.com |
|
|
Displays information about configurations of subdomains that exist on a specified domain. By default, displays info on all subdomains on a domain. Use the |
To display information about all subdomains on domain example.com: # ./subdomain --info -domain example.com or # ./subdomain -i -domain example.com |
|
|
Displays help on the use of the utility. |
To see the help info on the use of this utility: # ./subdomain -–help or # ./subdomain -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies the parent domain that the subdomain belongs to. |
To create a subdomain on example.com: # ./subdomain -c subdom -domain example.com |
|
|
Changes the name of a subdomain. Used only with the |
To change the name of subdomain subdom.example.com to subdomnew.example.com: # ./subdomain -u subdom -domain example.com -new_name subdomnew |
|
|
Specifies the FTP account to be used on a subdomain. If set to Set to When used with the |
To set subdomain subdom.example.com to use a separate FTP account with FTP user login name ftplogin: # ./subdomain -u subdom -domain example.com -ftp_user native -login ftplogin |
|
|
Sets the user login name for subdomain's own separate FTP account (the FTP Login parameter). The login name can only be specified if the subdomain uses its own, separate FTP account. |
To change the user login name for the separate FTP account on subdomain subdom.example.com to ftplogin: # ./subdomain -u subdom -domain example.com -login ftplogin |
|
|
Sets the user password for subdomain's own separate FTP account (the Password parameter). The password can only be specified if the subdomain uses its own, separate FTP account. See additional comments in the Note below the table. |
To set the user password for the separate FTP account on subdomain subdom.example.com to ftppass: # ./subdomain -u subdom -domain example.com -passwd ftppass |
|
|
Specifies the type of the FTP user password - plain or cryptic. Is set to See additional comments in the Note below the table. |
To set the type of the FTP user password to cryptic on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -passwd_type crypt |
|
|
Sets the Hard disk quota limit for a subdomain. (type " Set to Unlimited by default. The hard disk quota limit can only be set if the subdomain uses its own, separate FTP account. |
To set the hard disk quota limit to 10 GB: # ./subdomain -u subdom -domain example.com -ftp_user native -hard_quota 10G |
|
|
Enables or disables SSI support on a subdomain (the SSI support parameter). Set to |
To enable SSI support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -ssi true |
|
|
Enables or disables PHP support on the subdomain (the PHP support parameter). Set to |
To enable PHP support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -php true |
|
|
Enables or disables CGI support on a subdomain (the CGI support parameter). Set to |
To enable CGI support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -cgi true |
|
|
Enables or disables FastCGI support on a subdomain (the mod_fcgid support parameter). Set to |
To enable FastCGI support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -fastcgi true |
|
|
Enables or disables Perl support on a subdomain (the mod_perl support parameter). Set to |
To enable Perl support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -perl true |
|
|
Enables or disables ASP support on a subdomain (the ASP support parameter). Set to |
To enable ASP support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -asp true |
|
|
Enables or disables Python support on a subdomain (the mod_python support parameter). Set to |
To enable Python support on subdomain subdom.example.com: ./# ./subdomain -u subdom -domain example.com -python true |
|
|
Enables or disables ColdFusion support on a subdomain (the ColdFusion support support parameter). Set to |
To enable ColdFusion support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -coldfusion true |
|
|
Enables or disables Miva support on a subdomain. Set to |
To enable Miva support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -miva true |
|
|
Specifies the subdomains to remove or to display information about. Is used in combination with |
To remove subdomains subdom1.example.com and subdom2.example.com from domain example.com: # ./subdomain --remove -subdomains subdom1,subdom2 -domain example.com |
|
|
Enables or disables SSL support on a subdomain domain. Set to |
To enable SSL support on subdomain subdom.example.com: # ./subdomain -u subdom -domain example.com -ssl true |
|
|
Enables or disables using a single directory for storing content accessible through SSL and non-SSL connection (the Set to |
To enable using a single directory for storing content accessible through SSL and non-SSL connection on subdomain subdom.example.com: # ./subdomain -u subdom -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.