The domain_template utility is used to create and edit domain templates through CLI. The utility allows the following operations:
Syntax
domain_template <command> <domain template name> [
<option_1> [<param>]
[<option_2> [<param>]]
…[<option_N> [<param>]]]
Example
The following command line creates new domain template named DomainTemplate; enables physical hosting and allocates 100 MB of disk space for domains to be created using this template; sets the domain validity period to one year starting from the domain creation date; sets the monthly domain traffic limit to 500 MB/month; enables Python, PHP, and Apache PHP support; enables forwarding of e-mail messages addressed to non-existing users to e-mail address admin@example.com.
# ./domain_template -c DomainTemplate -hosting true -disk_space 100M -expiration 1Y -max_traffic 500 -python true -asp true -php true -no_usr admin@example.com
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates a new domain template. |
To create a domain template named DomainTemplate: # ./domain_template --create DomainTemplate or # ./domain_template -c DomainTemplate |
|
|
Updates an existing domain template. |
To update a domain template named DomainTemplate: # ./domain_template --update DomainTemplate or # ./domain_template -u DomainTemplate |
|
|
Deletes a domain template. |
To remove a domain template DomainTemplate: # ./domain_template --remove DomainTemplate or # ./domain_template -r DomainTemplate |
|
|
Displays information about a domain template in the XML format. |
To display information about domain template DomainTemplate in the XML format: # ./domain_template --xml-info DomainTemplate or # ./domain_template -x DomainTemplate |
|
|
Displays help on the use of the utility. |
To view help on the use of the utility: # ./domain_template --help or # ./domain_template -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Sets a new name for an existing domain template. |
To change the name of domain template DomainTemplate to NewDomainTemplate: # ./domain_template -u DomainTemplate -new-name NewDomainTemplate |
|
|
Assigns a domain template to a client account |
To assign domain template DomainTemplate to a client with Plesk login name Client: # ./domain_template -u DomainTemplate -clogin Client |
|
|
Enables or disables message bouncing, forwarding to an e-mail address, or rejecting mail addressed to non-existing users. Sets the Mail to nonexistent user parameter (Bounce with message, Forward to address, and Reject options) and specifies the text added on top of the bounced messages. |
To enable bouncing mail messages addressed to non-existing users and adding text mail service for this email address has been discontinued to the bounced messages in domain template DomainTemplate: # ./domain_template -u DomainTemplate -no_usr bounce:"mail service for this email address has been discontinued" To enable forwarding mail messages addressed to non-existing users to admin@example.com in domain template DomainTemplate: # ./domain_template -u DomainTemplate -no_usr admin@example.com |
|
|
Enables or disables the use of WebMail. Set to |
To enable WebMail support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -webmail true |
|
|
Sets the Maximum number of domain aliases limit. (type " Set to Unlimited by default. |
To set the Maximum number of domain aliases limit in domain template DomainTemplate to 10: # ./domain_template -u DomainTemplate -max_dom_aliases 10 |
|
|
Sets the Disk space limit. (type " Set to Unlimited by default. |
To set the Disk space limit in domain template DomainTemplate to 50 MB: # ./domain_template -u DomainTemplate -disk_space 50M |
|
|
Sets the Maximum amount of traffic (per month) limit. (type " Set to Unlimited by default. |
To set the Maximum amount of traffic limit in domain template DomainTemplate to 500 MB/month: # ./domain_template -u DomainTemplate -max_traffic 500M |
|
|
Sets the Maximum number of mailboxes limit. (type " Set to Unlimited by default. |
To set the Maximum number of mailboxes limit in domain template DomainTemplate to 50: # ./domain_template -u DomainTemplate -max_box 50 |
|
|
Sets the Mailbox quota limit. (type " Set to Unlimited by default. |
To set the Mailbox quota limit in domain template DomainTemplate to 50 MB: # ./domain_template -u DomainTemplate -mbox_quota 50M |
|
|
Sets the Total mailboxes quota limit (in MB). (type " |
To set the Total mailboxes quota limit in domain template DomainTemplate to 50 MB: # ./domain_template -u DomainTemplate -total_mboxes_quota 50 |
|
|
Sets the Maximum number of mail redirects limit. (type " Set to Unlimited by default. |
To set the Maximum number of mail redirects limit in domain template DomainTemplate to Unlimited: # ./domain_template -u DomainTemplate -max_redir -1 |
|
|
Sets the Maximum number of mail groups limit. (type " Set to Unlimited by default. |
To set the Maximum number of mail groups limit in domain template DomainTemplate to 100: # ./domain_template -u DomainTemplate -max_mg 100 |
|
|
Sets the Maximum number of mail autoresponders limit. (type " Set to Unlimited by default. |
To set the Maximum number of mail autoresponders limit in domain template DomainTemplate to 50: # ./domain_template -u DomainTemplate -max_resp 50 |
|
|
Sets the Maximum number of web users limit. (type " Set to Unlimited by default. |
To set the Maximum number of web users limit in domain template DomainTemplate to 100: # ./domain_template -u DomainTemplate -max_wu 100 |
|
|
Sets the Maximum number of databases limit. (type " Set to Unlimited by default. |
To set the Maximum number of databases limit in domain template DomainTemplate to 20: # ./domain_template -u DomainTemplate -max_db 20 |
|
|
Sets the Maximum number of mailing lists limit. (type " Set to Unlimited by default. |
To set the Maximum number of mailing lists limit in domain template DomainTemplate to 50: # ./domain_template -u DomainTemplate -max_maillists 50 |
|
|
Sets the Maximum number of Java applications limit. (type " |
To set the Maximum number of Java applications limit in domain template DomainTemplate to 100: # ./domain_template -u DomainTemplate -max_webapps 100 |
|
|
Sets the Maximum number of subdomains limit. (type " Set to Unlimited by default. |
To set the Maximum number of subdomains limit in domain template DomainTemplate to 20: # ./domain_template -u DomainTemplate -max_subdom 20 |
|
|
Sets the Validity period limit starting from creation date of a the domain account. (type " Set to Unlimited by default. |
To set the Validity period limit in domain template DomainTemplate to 20 days: # ./domain_template -u DomainTemplate -expiration 20D To set the Validity period limit in domain template DomainTemplate to 1 year: # ./domain_template -u DomainTemplate -expiration 1Y |
|
|
Enables or disables log rotation on a domain. Is set to |
To disable log rotation in domain template DomainTemplate: # ./domain_template -u DomainTemplate -log_rotate false |
|
|
Enables or disables log rotation on domain based on the current log file size (the Log rotation condition parameter). |
To enable log rotation once the current log file reaches the 20 KB size in domain template DomainTemplate: # ./domain_template -u DomainTemplate -log_bysize 20 |
|
|
Enables or disables log rotation on domain based on the current log file size (the Log rotation condition parameter). Set to |
To set weekly log rotation in domain template DomainTemplate: # ./domain_template -u DomainTemplate -log_bytime weekly |
|
|
Sets the Maximum number of log files parameter. |
To set the maximum number of log files to 5 in domain template DomainTemplate: # ./domain_template -u DomainTemplate -log_max_num 5 |
|
|
Enables or disables log file compression (the Compress log files parameter). Set to |
To enable log file compression in domain template DomainTemplate: # ./domain_template -u DomainTemplate -log_compress true |
|
|
Enables or disables automatic sending of rotated log files to the specified e-mail address (the Send processed log files to e-mail parameter). |
To enable automatic sending of rotated log files to domainadmin@example.com in domain template DomainTemplate: # ./domain_template -u DomainTemplate -log_email domainadmin@example.com |
|
|
Sets the Retain traffic statistics (in months) parameter for a domain (Report > Traffic history > Traffic statistics retention preferences >). (type " |
To set the Retain traffic statistics parameter in domain template DomainTemplate to 5 months: # ./domain_template -u DomainTemplate -keep_traf_stat 5 |
|
|
Sets the Mailing lists parameter. Set to |
To enable mailing lists in domain template DomainTemplate: # ./domain_template -u DomainTemplate -maillist true |
|
|
Sets the Type of domain DNS zone parameter. Set to |
To set the Plesk DNS server to act as slave DNS server in domain template DomainTemplate: # ./domain_template -u DomainTemplate -dns_zone_type slave |
|
|
Enables or disables physical hosting on domain (the Physical hosting parameter). Set to |
To enable physical hosting in domain template DomainTemplate: # ./domain_template -u DomainTemplate -hosting true |
|
|
Sets the Hard disk quota parameter for domain. Type Set to Unlimited by default. |
To set the hard disk quota to 100 MB in domain template DomainTemplate: # ./domain_template -u DomainTemplate -quota 100M |
|
|
Enables or disables SSL support (the SSL support parameter). Set to |
To enable SSL support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -ssl true |
|
|
Enables or disables using a single directory for storing content accessible through SSL and non-SSL connection (the Use a single directory for housing SSL and non-SSL content parameter). Set to |
To enable using a single directory for storing content accessible through SSL and non-SSL connection in domain template DomainTemplate: # ./domain_template -u DomainTemplate -same_ssl true |
|
|
Enables or disables the SSI support parameter. Set to |
To enable SSI support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -ssi true |
|
|
Sets the use SSI for *.htm, *.html files option for the SSI support parameter. Set to |
To enable SSI support for HTML and HTM files in domain template DomainTemplate: # ./domain_template -u DomainTemplate -ssi_html true |
|
|
Enables or disables PHP support (the PHP support parameter). Set to |
To enable PHP support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -php true |
|
|
Enables or disables CGI support (the CGI support parameter). Set to |
To enable CGI support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -cgi true |
|
|
Enables or disables the mod_perl support parameter. Set to |
To enable Perl support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -perl true |
|
|
Enables or disables Apache ASP support (the Apache ASP support parameter). Set to |
To enable Apache ASP support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -asp true |
|
|
Enables or disables Python support (the mod_python support parameter). Set to |
To enable Python support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -python true |
|
|
Enables or disables ColdFusion support (the ColdFusion support parameter). Set to |
To enable ColdFusion support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -coldfusion true |
|
|
Enables or disables FastCGI support (the mod_fcgi support parameter). Set to |
To enable FastCGI support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -fastcgi true |
|
|
Enables or disables shell access user and sets the OS system shell for FTP user access. (You can use the Set to |
To enable shell access and set the /bin/sh/ shell for domain FTP user in domain template DomainTemplate: # ./domain_template -u -shell /bin/sh To display the list of available shells: # ./domain --shells |
|
|
Enables or disables Web statistic support; selects Web statistics application (Awstats or Webalizer) (the Web statistics parameter). Set to |
To enable Webalizer support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -webstat webalizer |
|
|
Enables or disables the accessible via password protected directory '/plesk-stat/' option for the Web statistics parameter. Set to |
To enable remote user access to the Web statistics data at http://example.com/plesk-stat/ in domain template DomainTemplate: # ./domain_template -u DomainTemplate -webstat_protdir true |
|
|
Enables or disables custom server error messages on a domain ( the Custom Error Documents parameter). Set to |
To enable custom error messages support in domain template DomainTemplate: # ./domain_template -u DomainTemplate -err_docs true |
|
|
Enables or disables scripting support for web users on a domain (the Allow the web users scripting parameter). Set to |
To enable scripting support for web users in domain template DomainTemplate: # ./domain_template -u DomainTemplate -wuscripts true |