Domain Accounts: domain Utility

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

Syntax

domain <command> <domain name> [

<option_1> [<param>]

[<option_2> [<param>]]

…[<option_N> [<param>]]

Example

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

# ./domain --create example.com -clogin clientlogin -ip 192.168.67.78 -status enabled -hosting true -hst_type phys -dns true -login ftpuserlogin -passwd ftpuserpass -cgi true -php true

Commands

Ñommand

Parameter

Description

Example

--create or --c

<domain name>

Creates a new domain.

Requires concomitant use of the -clogin option.

To create new domain example.com for a client with login name clientlogin:

# ./domain --create example.com -clogin clientlogin - ip 192.168.67.78

or

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

--update or --u

<domain name>

Updates configuration of an existing domain.

To enable domain example.com:

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

--remove or --r

<domain name>

Deletes an existing domain.

To delete 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 display configuration information about domain example.com:

# ./domain --info example.com

or

# ./domain --i example.com

--on

 

 

<domain name>

Enables a domain.

To enable domain example.com:

# ./domain --on example.com

--off

<domain name>

Disables a domain.

To disable domain example.com:

# ./domain --off example.com

--change-owner

<domain_name>

Changes the owner of a domain.

Requires concomitant use of the -clogin option.

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

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

--shells or -s

<domain name>

Displays the list of available shells on a domain.

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

# ./domain --shells

--help or -h

 

Displays help on the use of the utility.

To display 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 or 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 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 only with the -u command.

To change the name of the domain example.com to newname.org:

# ./domain -u example.com -new_name newname.org

-dns

true| false

Enables or disables DNS zone for a domain.

To enable DNS zone for domain example.com:

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

To disable a DNS zone for domain example.com:

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

-www

true| false

Enables the www prefix option for Domain name.

Set to true by default.

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

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

-hosting

true| false

Enables or disables hosting for a domain.

Set to false by default.

Requires concomitant use of the -ip option.

To enable hosting for domain example.com:

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

-hst_type

phys| std| frm

Sets the type of hosting on a domain: phys - physical hosting, std - standard forwarding, frm - frame forwarding.

Set to phys by default.

Requires concomitant use of the -ip option.

When the std or frm parameters are specified, the -target_url option must also be used.

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

# ./domain -u example.com -hst_type std -target_url newname.org -ip 192.168.76.87

-target_url

<URL>

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

Must be used concomitantly with the -ip option and the -hst_type option specifying the std or frm parameters.

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

# ./domain -u example.com -target_url newname.org -hst_type std -ip 192.168.76.87

-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.

Must be used concomitantly with options creating a domain or specifying hosting type for a domain (-hosting, -hst_type, -target_url).

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

# ./domain -c example.com -clogin clientlogin -ip 192.168.76.87

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

# ./domain -c example.com -hosting -hst_type -phys true -ip 192.168.76.87

-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 login name ftplogin and password ftppass when creating domain example.com with physical hosting:

# ./domain -c example.com -hosting true -hst_type phys -clogin clientlogin -login ftplogin -passwd ftppass

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

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

-passwd

<password>

Specifies the FTP user password on a domain with physical hosting. No password is set by default.

To change the FTP user password to newftppass:

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

-passwd_type

plain| crypt

Specifies the type of the FTP user password - plain or cryptic.

Set to plain by default.

To set the type of FTP user password to cryptic for existing domain example.com with physical hosting:

# ./domain -u example.com -passwd_type crypt

-shell

 

<shell name>|forbidden

Enables or disables shell access for FTP user and sets the OS system shell for FTP user access. (You can use the --shells command to display the list of available shells).

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

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

-hard_quota

<number>[K|M|G]

Sets the Hard disk quota parameter for domain. Type 0 to set the parameter to Unlimited. A number without a letter is interpreted as the number of bytes.

To set a 10 Mb hard disk quota for domain example.com:

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

or

# ./domain -u example.com -hard_quota 10000K

-fp

true|false

Enables or disables FrontPage support on a domain. Is set to 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 domain example.com:

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

-fp_ssl

true| false

Enables or disables FrontPage Over SSL support on a domain. Is set to 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 domain example.com:

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

-fpauth

true| false

Enables or disables FrontPage authoring on a domain. Is set to 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

<string>

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 to fploginname on domain example.com:

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

-fppasswd

<string>

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 to fpuserpass on domain example.com:

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

-creation-date

<YYYY-MM-DD>

Sets the domain creation date.

Used only with the --create command.

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

# ./domain -c example.com -clogin clientlogin -creation-date 2006-12-30

-ssi

true| false

Enables or disables SSI support on a domain.

Set to false by default.

To enable SSI support on domain example.com:

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

-php

true| false

Enables or disables PHP support on a domain.

Set to false by default.

To enable PHP support on domain example.com:

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

-php_safe_mode

true| false

Enables or disables safe mode for PHP support on domain.

Set to true by default.

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

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

-cgi

true| false

Enables or disables CGI support on a domain.

Set to false by default.

To enable CGI support on domain example.com:

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

-perl

true| false

Enables or disables Perl support on a domain.

Set to false by default.

To enable Perl support on domain example.com:

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

-asp

true| false

Enables or disables Apache ASP support on a domain.

Set to false by default.

To enable Apache ASP support on domain example.com:

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

-python

true| false

Enables or disables Python support on a domain.

Set to false by default.

To enable Python support on domain example.com:

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

-fastcgi

true| false

Enables or disables FastCGI support on a domain.

Set to false by default.

To enable FastCGI support on domain example.com:

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

-coldfusion

true| false

Enables or disables ColdFusion support on a domain.

Set to false by default.

To enable ColdFusion support on domain example.com:

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

-miva

true| false

Enables or disables Miva support on a domain.

Set to false by default.

To enable Miva support on domain example.com:

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

-ssl

true| false

Enables or disables SSL support on a domain.

Set to false by default.

To enable SSL support on domain example.com:

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

-same_ssl

true| false

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 false by default.

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

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

-webstat

none| awstats| webalizer

Enables or disables Web statistic support; selects Web statistics application (Awstats or Webalizer) on a domain.

To enable Webalizer support on domain example.com:

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

-webstat-protdir-access

true| false

Enables or disables access to web statistics data through password- protected directory /plesk-stat (the accessible via password protected directory '/plesk-stat/' parameter).

Set to false by default.

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

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

-err_docs

true| false

Enables or disables custom server error messages on a domain ( the Custom Error Documents parameter).

Set to false by default.

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

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

-log_rotate

true| false

Enables or disables log rotation on a domain.

Set to false by default.

To enable log rotation on domain example.com:

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

-log_bysize

<KB>

Enables or disables log rotation on a domain based on the current log file size (the Log rotation condition parameter).

To enable log rotation for domain example.com once the current log file reaches the 20 Kb size:

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

-log_bytime

daily| weekly| monthly

Enables or disables log rotation on a domain based on the current log file size (the Log rotation condition parameter). Is set to daily by default.

To enable log rotation for domain example.com on a weekly basis:

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

-log_max_num

<number>

Sets the Maximum number of log files parameter.

Set to 3 by default.

To set the maximum number of log files (current and rotated) to 5 for domain example.com:

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

-log_compress

true| false

Enables or disables log file compression (the Compress log files parameter).

Set to true by default.

To disable log file compression for domain example.com:

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

-log_email

<e-mail address>

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 on domain example.com to e-mail 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 only with the --create or --change-owner commands.

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

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

-mail_service

true| false

Enables or disables mail service for a domain.

Set to true by default.

To disable mail service for domain example.com:

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

-maillist_service

true| false

Enables or disables the mailing list service on a domain.

Set to false by default.

To enable mailing list service for domain example.com:

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

-map_ip

<IP address>

Sets a new IP address for a domain.

Used only with the --change-owner command.

Required for the --change-owner command.

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

# ./domain --change-owner example.com -clogin clientlogin -map_ip 192.168.76.87

-aftp

true| false

Enables or disables the anonymous ftp service on a domain.

Set to false by default.

Deprecated starting with Plesk 8.1. Use the anonftp utility instead.

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

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

or

./anonftp -u example.com -status true

-aftp_inc

true| false

Enables or disables uploading to the incoming directory (the Allow uploading to incoming directory parameter).

Set to false by default.

Deprecated starting with Plesk 8.1. Use the anonftp utility instead.

To allow uploading files to the incoming directory by users:

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

or

./anonftp -u example.com -incoming true

-aftp_inc_disk_limit

<number>[K|M|G]

Sets disk space allocation for the incoming directory (the Limit disk space in the incoming directory parameter).

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

Type "-1" to set the parameter to Unlimited.

Deprecated starting with Plesk 8.1. Use the anonftp utility instead.

To limit disk space in the incoming directory to 900 Kb:

./anonftp -u example.com -aftp_inc_disk_limit 900K

-dom_user

true| false

Enables or disables the domain administrator account.

Set to false by default.

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

To enable the domain administrator account on domain example.com, set the domain administrator's password to domadminpass, make the password encrypted, set the personal name as Michael Smith, set the e-mail address to domadmin@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 domadminpass -du_pname "Michael Smith" -du_email domadmin@example.com -du_language it -du-multiple-sessions true

-du_passwd_type

plain| encrypted

Sets the type of the user password for domain administrator.

Deprecated starting with Plesk 8.1. Use the domadmin utility instead.

-du_passwd

<string>

Sets the user password for domain administrator.

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du_pname

<string>

Sets the Personal name parameter for domain administrator.

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du_email

<string>

Sets the Email address for domain administrator.

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du_language

<string>

Sets the default interface language for domain administrator (the Domain administrator's language parameter). The argument of the command must be a valid two-letter country code as described in ISO-3166 (for example, "it" stands for Italian).

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-du-multiple-sessions

true|false

Enables multiple simultaneous sessions on a domain (the Allow multiple sessions parameter).

Deprecated starting with Plesk version 8.1. Use the domadmin utility instead.

-notify

true|false

Allows or prevents standard e-mail notifications about the domain creation (Plesk domain administrators and clients).

Used only with the --create command.

To prevent e-mail notifications about domain creation:

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