Domain Accounts: domain Utility

The domain utility is used to manage domains through CLI. By using this utility, you can perform the following tasks:

Usage

domain <command> <domain name> [
<option_1> [<param>]
[<option_2> [<param>]]
… [<option_N> [<param>]]

Example

The following command creates and enables domain example.com, assigns the ownership of the domain to an existing Plesk client with the login name JDoe, assigns IP address 192.0.2.78 to the domain, enables physical hosting and DNS zone on the domain, sets login name John and password ftppass for the FTP user, and enables CGI and PHP support on the domain.

# ./domain --create example.com -clogin JDoe -ip 192.0.2.78 -status enabled -hosting true -hst_type phys -dns true -login John -passwd ftppass -cgi true -php true

Commands

Command

Parameter

Description

Example

--create or --c

<domain_name>

Creates a new domain.

Requires -clogin option.

To create the domain example.com for the client with the login name JDoe:

# ./domain --create example.com -clogin JDoe

or

# ./domain -c example.com -clogin JDoe

--update or --u

<domain_name>

Updates configuration of an existing domain.

To enable the domain example.com:

# ./domain -u example.com -status enabled

--remove or --r

<domain_name>

Deletes an existing domain.

To delete the domain example.com:

# ./domain --remove example.com

or

# ./domain -r example.com

--info or -i

<domain_name>

Displays information about configuration of a domain.

To view configuration information on the domain example.com:

# ./domain --info example.com

or

# ./domain --i example.com

--on

<domain_name>

Enables a domain.

To enable the domain example.com:

# ./domain --on example.com

--off

<domain_name>

Disables a domain.

To disable the domain example.com:

# ./domain --off example.com

--change-owner

<domain_name>

Changes the owner of a domain.

Requires the -clogin option.

To make the client with the login name JDoe the owner of domain example.com:

# ./domain --change-owner example.com -clogin JDoe

--shells or -s

<domain_name>

Displays the list of available shells on a domain.

To view the list of shells available on the Plesk server:

# ./domain --shells

--help or -h

 

Displays help on the use of the utility.

To view help on the use of the domain utility:

# ./domain --help

or

# ./domain -h

Options

Option

Parameter

Description

Example

-status

enabled|disabled|admin,domadm,parent,client,expired

Enables/Disables a domain (the enabled or disabled parameters, respectively). Disables domain and sets the domain status to Domain is disabled by administrator (admin), Domain is disabled by client (client), Domain is expired (expired). Sets the domain status to the status of the client account that owns the domain (parent). The use of the domadm parameter is restricted; the parameter should not be used for changing the domain status.

To enable the domain example.com:

# ./domain -u example.com -status enabled

To assign the status of domain example.com to the status of the client account that owns it:

# ./domain -u example.com -status parent

-new_name

<domain_name>

Renames a domain.

Used with the --update only.

To rename the domain example.com to sample.net:

# ./domain -u example.com -new_name sample.net

-dns

true|false

Enables/Disables DNS zone for a domain.

To enable DNS zone for the domain example.com:

# ./domain -u example.com -dns true

To disable a DNS zone for the domain example.com:

# ./domain -u example.com -dns false

-www

true|false

Enables/Disables the www prefix for a domain.

Is true by default.

To disable the www prefix for the domain example.com:

# ./domain -u example.com -www false

-hosting

true|false

Enables/Disables hosting for a domain.

Is false by default.

Requires -ip option.

To enable hosting for the domain example.com with the IP address 192.0.2.87:

# ./domain -u example.com -hosting true -ip 192.0.2.87

-hst_type

phys|std|frm

Sets the type of hosting on a domain.

The following types are available: physical hosting (phys), standard forwarding (std), and frame forwarding (frm).

Is phys by default.

Requires -ip option, when the phys parameter is specified.

Requires the -target_url option, when the std or frm parameters are specified.

To set up the standard forwarding hosting (with forwarding to sample.org) for the existing domain example.com:

# ./domain -u example.com -hst_type std -target_url sample.org

-target_url

<URL>

Sets a target URL for the Standard forwarding and Frame forwarding types of hosting.

Required with -hst_type option when the std or frm parameters are specified.

To set up a target URL for the domain example.com with the standard forwarding hosting (forwarding to sample.org):

# ./domain -u example.com -target_url sample.org -hst_type std

-ip

<ip_address>

Specifies the IP address of a domain that is created or updated.

For domains with physical hosting, the option also specifies the IP address at which domain content is hosted.

Requires with -hosting option and with -hst_type option when phys parameter is specified.

To specify an IP address for domain example.com when creating it to 192.0.2.87:

# ./domain -c example.com -clogin JDoe -ip 192.0.2.87

To indicate IP address of the domain example.com, where physical hosting configured:

#./domain -u example.com -hst_type phys -login jdoe -passwd sample -hosting true -ip 192.0.2.1

-login

<login_name>

Specifies FTP user login name, for example, while creating a new domain with physical hosting or changing hosting type for an existing domain.

Updates current FTP user login name.

To create FTP user with the login name john and password sample when creating domain example.com with physical hosting for the client JDoe:

# ./domain -c example.com -hosting true -hst_type phys -clogin JDoe -login john -passwd sample

To change the FTP user login name to jane on domain example.com with physical hosting:

# ./domain -u example.com -login jane

-passwd

<password>

Specifies the FTP user password on a domain with physical hosting.

Required with -passwd_type option.

No password is set by default.

To change the FTP user password on the domain example.com to sample:

# ./domain --update example.com -passwd sample

-passwd_type

plain|encrypted

Specifies the type of the FTP user password.

Requires -passwd option.

Is plain by default.

To set the FTP user on example.com password to qweqwe and password type to encrypted:

# ./domain -u example.com -passwd "as9C3ml08ncCE" -passwd_type encrypted

-shell

<shell_name>|forbidden

Enables/Disables shell access for FTP user, and sets the OS system shell for FTP user access.

To enable shell access for FTP user on the domain example.com, and to set the shell to /bin/sh:

# ./domain -u example.com -shell /bin/sh

-hard_quota

<number>[K|M|G]

Limits the FTP user hard disk quota.

Unlimited if set to 0.

A number without a letter is interpreted as the number of bytes.

To set a 100 MB hard disk quota for the domain example.com:

# ./domain -u example.com -hard_quota 100M

-fp

true|false

Enables/Disables FrontPage support on a domain.

Is false by default.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To enable Microsoft FrontPage support for the domain example.com:

# ./domain -u example.com -fp true

-fp_ssl

true|false

Enables/Disables FrontPage Over SSL support on a domain.

Is false by default.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To enable Microsoft FrontPage Over SSL support on the domain example.com:

# ./domain -u example.com -fp_ssl true

-fpauth

true|false

Enables/Disables FrontPage authoring on a domain.

Is false by default.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To enable Microsoft FrontPage authoring on domain example.com:

# ./domain -u example.com -fpauth true

-fplogin

<login_name>

Sets the login name for the FrontPage user.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To set the FrontPage user login name on the domain example.com to john:

# ./domain -u example.com -fplogin john

-fppasswd

<password>

Sets the password for the FrontPage user.

Deprecated since Plesk v.8.1 due to the stop of FrontPage support in Plesk for Linux/Unix.

To set the FrontPage user password on the domain example.com to sample:

# ./domain -u example.com -fppasswd sample

-creation-date

<YYYY-MM-DD>

Sets the domain creation date.

Used with the --create only.

To set the creation date for domain example.com to 2008-12-30:

# ./domain -c example.com -clogin JDoe -creation-date 2008-12-30

-ssi

true|false

Enables/Disables SSI support.

Is false by default.

To enable SSI support on the domain example.com:

# ./domain -u example.com -ssi true

-php

true|false

Enables/Disables PHP support.

Is false by default.

To enable PHP support on the domain example.com:

# ./domain -u example.com -php true

-php_safe_mode

true|false

Enables/Disables safe mode for PHP support.

Is true by default.

To disable safe mode for PHP support on the domain example.com:

# ./domain -u example.com -php true -php_safe_mode false

-cgi

true|false

Enables/Disables CGI support.

Is false by default.

To enable CGI support on the domain example.com:

# ./domain -u example.com -cgi true

-perl

true|false

Enables/Disables Perl support.

Is false by default.

To enable Perl support on the domain example.com:

# ./domain -u example.com -perl true

-asp

true|false

Enables/Disables Apache ASP support.

Is false by default.

To enable Apache ASP support on the domain example.com:

# ./domain -u example.com -asp true

-python

true|false

Enables/Disables Python support.

Is false by default.

To enable Python support on the domain example.com:

# ./domain -u example.com -python true

-fastcgi

true|false

Enables/Disables FastCGI support.

Is false by default.

To enable FastCGI support on the domain example.com:

# ./domain -u example.com -fastcgi true

-coldfusion

true|false

Enables/Disables ColdFusion support.

Is false by default.

To enable ColdFusion support on the domain example.com:

# ./domain -u example.com -coldfusion true

-miva

true|false

Enables/Disables Miva support.

Is false by default.

To enable Miva support on the domain example.com:

# ./domain -u example.com -miva true

-ssl

true|false

Enables/Disables SSL support.

Is false by default.

To enable SSL support on the domain example.com:

# ./domain -u example.com -ssl true

-same_ssl

true|false

Enables/Disables using a single directory for storing content accessible through SSL and non-SSL connection.

Is false by default.

To enable using a single directory for storing content accessible through SSL and non-SSL connection on the domain example.com:

# ./domain -u example.com -same_ssl true

-webstat

none|awstats|webalizer

Enables/Disables Web statistic support; selects Web statistics application (Awstats or Webalizer).

Is none by default.

To enable Webalizer support on the domain example.com:

# ./domain -u example.com -webstat webalizer

-webstat-protdir-access

true|false

Enables/Disables access to web statistics data through password- protected directory /plesk-stat.

Is false by default.

To enable access to web statistics data through password- protected directory /plesk-stat on the domain example.com:

# ./domain -u example.com -webstat-protdir-access true

-err_docs

true|false

Enables/Disables custom server error messages.

Is false by default.

To enable custom error messages support on the domain example.com:

# ./domain -u example.com -err_docs true

-log_rotate

true|false

Enables/Disables log rotation.

Is false by default.

To enable log rotation on the domain example.com:

# ./domain -u example.com -log_rotate true

-log_bysize

<number>[K|M|G]

Enables/Disables log rotation based on the current log file size.

To enable log rotation on the domain example.com once the current log file reaches the 200 KB size:

# ./domain -u example.com -log_bysize 200

-log_bytime

daily|weekly|monthly

Enables/Disables log rotation by time.

Is daily by default.

To enable weekly log rotation on the domain example.com:

# ./domain -u example.com -log_bytime weekly

-log_max_num

<number>

Limits the number of log files parameter.

Is 3 by default.

To restrict the maximum number of log files (current and rotated) on the domain example.com to 10:

# ./domain -u example.com -log_max_num 10

-log_compress

true|false

Enables/Disables log file compression.

Is true by default.

To disable log file compression on the domain example.com:

# ./domain -u example.com -log_compress false

-log_email

<email>

Enables/Disables automatic sending of rotated log files to the specified email address.

To enable automatic sending of rotated log files on the domain example.com to email address admin@example.com:

# ./domain -u example.com -log_email admin@example.com

-clogin

<client_login_name>

Specifies the login name of an existing Plesk client who will own the domain.

Used with the --create or --change-owner commands only.

To create the domain example.com and assign ownership of the domain to a Plesk client with the login name JDoe:

# ./domain -c example.com -clogin JDoe

-mail_service

true|false

Enables/Disables mail service.

Is true by default.

To disable mail service on the domain example.com:

# ./domain -u example.com -mail_service false

-maillist_service

true|false

Enables/Disables the mailing list service.

Is false by default.

To enable mailing list service on the domain example.com:

# ./domain -u example.com -maillist_service true

-map_ip

<IP_address>

Sets a new IP address for a domain.

Used with --change-owner only.

Required with --change-owner.

To set the IP address 192.0.2.87 for the domain example.com when changing the owner of the domain to Plesk client with the login name JaneDoe:

# ./domain --change-owner example.com -clogin JaneDoe -map_ip 192.0.2.87

-publish-sb-site

true|false

Allows/Prohibits publishing site with Sitebuilder.

Is false by default.

Available since Plesk 8.3.

To allow publishing site with Sitebuilder on the domain example.com:

# ./domain -u example.com -publish-sb-site true

-max-connections

<number>

Limits the number of available connections.

Unlimited is set to -1.

Available since Plesk 8.3.

To limit the maximum number of connections available for the domain example.com to 10:

# ./domain -u example.com -max-connections 10

-traffic-bandwidth

<number>

Limits the network use.

Unlimited is set to -1.

Available since Plesk 8.3.

To limit the maximum network use on the domain example.com to 500 KB/S:

# ./domain -u example.com -traffic-bandwidth 500

-aftp

true|false

Enables/Disables the anonymous ftp service.

Is false by default.

Deprecated since Plesk 8.1. Use the anonftp utility instead.

To enable the anonymous FTP service on the domain example.com:

# ./domain -u example.com -aftp true

or

./anonftp -u example.com -status true

-aftp_inc

true|false

Enables/Disables uploading to the incoming directory.

Is false by default.

Deprecated since Plesk 8.1. Use the anonftp utility instead.

To allow uploading files to the incoming directory:

# ./domain -u example.com -aftp_inc true

or

./anonftp -u example.com -incoming true

-aftp_inc_disk_limit

<number>[K|M|G]

Limits the amount of disk space for the incoming directory.

A number without a letter is interpreted as the number of bytes.

Unlimited if set to -1.

Deprecated since Plesk 8.1. Use the anonftp utility instead.

To restrict the amount of disk space available for the incoming directory to 10 MB:

./anonftp -u example.com -aftp_inc_disk_limit 10M

-dom_user

true|false

Enables/Disables a domain administrator account.

Is false by default.

Deprecated since Plesk version 8.1. Use the domadmin utility instead.

To enable the domain administrator account on the domain example.com, set the domain administrator's password to adminpass, make the password encrypted, set the personal name as John Doe, set the email address to admin@example.com, set the default Plesk interface language for domain administrator to Italian, and enable multiple simultaneous domain administrator sessions:

# ./domain -u example.com -dom_user true -du_passwd_type encrypted -du_passwd adminpass -du_pname "John Doe" -du_email admin@example.com -du_language it-IT -du-multiple-sessions true

-du_passwd_type

plain|encrypted

Sets the type of the user password for domain administrator.

Is plain by default.

Deprecated since Plesk 8.1. Use the domadmin utility instead.

-du_passwd

<string>

Sets the user password for domain administrator.

Deprecated since Plesk 8.1. Use the domadmin utility instead.

-du_pname

<string>

Sets the domain administrator personal name.

Deprecated since Plesk 8.1. Use the domadmin utility instead.

-du_email

<string>

Sets the Email address for domain administrator.

Deprecated since Plesk 8.1. Use the domadmin utility instead.

-du_language

<string>

Sets the default interface language for domain administrator.

The argument of the command must be a valid two letter language code and two-letter country code as described in ISO-3166 (for example, "it-IT" stands for Italian).

Deprecated since Plesk 8.1. Use the domadmin utility instead.

-du-multiple-sessions

true|false

Enables/Disables multiple network simultaneous sessions for a domain administrator.

Deprecated since Plesk 8.1. Use the domadmin utility instead.

-notify

true|false

Allows/Prohibits standard email notifications on a domain creation (Plesk domain administrators and clients).

Used with --create only.

To prevent email notifications about domain creation:

# ./domain --create example.com -clogin JDoe -notify false