PLESK COMMAND LINE INTERFACE

Section 3.2.1 Managing Domains

3.2.1.1 Creating and modifying domains

3.2.1.1.1 Purpose

The domain.sh and domain_pref.sh utilities are designed for creating/removing domains under the control of Plesk Server Administrator, and for updating the domain properties and hosting settings.

3.2.1.1.2 Usage

Usage: domain.sh command <domain_name> [options]

Available commands and options:

Command Parameter Action
--create or -c <domain_name> creates a new domain
--update or -u <domain_name> updates an existing domain
--remove or -r <domain_name> removes an existing domain
--info or -i <domain_name> retrieves domain information
--on <domain_name> enables a domain
--off <domain_name> disables a domain
--shells or -s   display lists of available shells
--help or -h   displays help on the utility usage
Option Parameter Note
-status <true|false> turns a domain on/off (default: true)
-new_name <domain> renames a domain (may be specified only with "update" command)
-dns <true|false> turns DNS zone for the domain on/off (by default DNS template status)
-www <true|false> adds www prefix (default: true)
-hosting <true|false> enables/disables hosting for a domain (default: false)
-hst_type <phys|std|frm> sets up the specified hosting type (default: physical)
-target_url <URL> sets up a target URL (required if hst_type is "std" or "frm")
-ip <ip_address> IP address
-login <login> FTP user login name (required if hosting is physical)
-passwd_type <plain|crypt> FTP user password type (default: plain)
-passwd <password> FTP password (no password is set by default)
-shell <shell_name|help> system shell (you can use the --shells command to list available shells)
-hard_quota <MB> hard disk quota (0 is unlimited)
-fp <true|false> turns on/off FrontPage support on a domain (default: false)
-fp_ssl <true|false> turns on/off FrontPage Over SSL support on a domain (default: false)
-fpauth <true|false> FrontPage authorization (default: false)
-fplogin <login> FrontPage login name
-fppasswd <password> FrontPage password
-ssi <true|false> SSI support on a domain (default: false)
-php <true|false> PHP support on a domain (default: false)
-cgi <true|false> CGI support on a domain (default: false)
-perl <true|false> Perl support on a domain (default: false)
-asp <true|false> ASP support on a domain (default: false)
-python <true|false> Python support on a domain (default: false)
-coldfusion <true|false> ColdFusion support on a domain (default: false)
-ssl <true|false> SSL support on a domain (default: false)
-webstat <true|false> Webalizer support on a domain (default: false)
-err_docs <true|false> Custom error documents support on a domain (default: false)
-log_rotate <true|false> log rotation status (default: true)
-log_bysize <KB> enables log rotation by size
-log_bytime <daily|weekly|monthly> enables log rotation by time (default: daily)
-log_max_num <number> defines the maximum number of log file instances (default: 3)
-log_compress <true|false> enables log files compression (default: true)
-log_email <email> enables sending log files to an e-mail address
-clogin <login> login of the existing client the domain is created for (required for domain creation)
-mail_service <true|false> turns on/off mail service for a domain (default: true)
-notify <true|false> enables/disables notification of domain creation


Usage: domain_pref.sh command <domain_name> [options]

Available commands and options:

Command Parameter Action
--update or -u domain_name sets domain preferences
--info or -i domain_name retrieves domain preferences information
--help or -h   displays help on the utility usage
Option Parameter Note
-disk_space <MB> limits the amount of available disk space (-1 is unlimited)
-max_traffic <MB/Month> limits the amount of traffic for a domain (-1 is unlimited)
-max_box <number> limits the number of mailboxes (-1 is unlimited)
-mbox_quota <KB> limits mailbox quota (-1 is unlimited)
-max_redir <number> limits the number of mail redirects (-1 is unlimited)
-max_mg <number> limits the number of mail groups (-1 is unlimited)
-max_resp <number> limits the number of mail autoresponders (-1 is unlimited)
-max_wu <number> limits the number of web users (-1 is unlimited)
-max_db <number> limits the number of databases (-1 is unlimited)
-max_maillists <number> limits the number of mailing lists (-1 is unlimited)
-max_webapps <number> limits the number of allowed web applications (-1 is unlimited)
-max_subdom <number> limits the number of subdomains (-1 is unlimited)
-expiration <YYYY-MM-DD> limits the validity period for a domain (-1 is unlimited)
-www <true|false> adds www prefix for a domain
-wuscripts <true|false> enables web users scripting support
-webmail <true|false> allows using Webmail
-no_usr <bounce:txt|email> sets up bounce or catch-all for a nonexisting user mail
-keep_traf_stat <number> sets the system to retain traffic statistics for N months (specify 0 if you wish not to delete statistics)
-enable   enables a domain
-disable <bounce:txt|email> disables a domain
-reason <admin|client|parent[,]> names under which the domain status is changed [admin by default]

3.2.1.1.3 Examples

Creating a domain:
./domain.sh --create "domain.zone" -clogin "client1" -ip "192.168.1.1"

Setting up hosting:
./domain.sh --update "domain.zone" -hosting true -hst_type phys -login "domain_zone" -passwd "password"

Changing domain limits:
./domain_pref.sh --update "domain.zone" -disk_space 10

Removing a domain:
./domain.sh --remove "domain.zone" 


to top