Domain Accounts: domain.exe

The domain.exe utility serves to manage domains and allows the following operations:

 

Location

%plesk_cli%

Usage

domain.exe <command> [<domain name>] [
<option 1> <param> [<option 2> <param>] … [<option N> <param>]
]

 

Example

The following command creates for a client account JohnDoe a domain with name example.com. Then, the command makes the domain available when accessing it with the www prefix, enables physical hosting for the domain, sets FTP login to John with a password sample, binds the domain with IP address 192.0.2.54 (since not specified explicitly, physical hosting is used). Then, the command enables CGI support on the domain and disables sending the domain created notification to Plesk administrator.

>domain.exe --create example.com -owner JohnDoe -www true -hosting true -login John -passwd sample -ip 192.0.2.54 -cgi true -notify false

 

Commands

Command

Parameter

Description

Example

--create or -c

<domain name>

Creates a domain.

Requires -owner and -ip options.

Modified in Plesk 9.0.

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

>domain.exe --create example.com -owner JohnDoe -ip 192.0.2.54

or

>domain.exe -c example.com -owner JohnDoe -ip 192.0.2.54

--update or -u

<domain name>

Changes properties of an existing domain.

To limit the amount of disk space that example.com can occupy to 200 MB:

>domain.exe --update example.com -hard_quota 200M

or

>domain.exe -u example.com -hard_quota 200M

--remove or -r

<domain name>

Removes a domain.

To remove example.com:

>domain.exe --remove example.com

or

>domain.exe -r example.com

--info or -i

<domain name>

Retrieves domain info.

To retrieve information about example.com:

>domain.exe --info example.com

or

>domain.exe --i example.com

--change-owner

<domain name>

Changes an owner of a domain.

Requires the -owner options.

If the IP address assigned to the domain is not shared between previous and new owner, you must specify it explicitly using the -map_ip option.

Modified in Plesk 9.0.

To make JDoe the owner of domain example.com:

>domain.exe --change-owner example.com -owner JDoe

--on

<domain name>

Enables a domain.

To enable example.com:

>domain.exe --on example.com

--off

<domain name>

Disables a domain.

To disable example.com:

>domain.exe --off example.com

--help or -h

 

Displays help on the use of the utility.

To output the help info on the use of this utility:

>domain.exe --help

or

>domain.exe -h

 

Options

Option

Parameter

Description

Example

-status

true|false

Enables/Disables a domain.

Is true by default.

To enable example.com:

>domain.exe --update example.com -status true

-new_name

<domain>

Renames a specified domain.

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

>domain.exe --update example.com -new_name sample.com

-dns

true|false

Enables/Disables DNS zone.

By default, settings from the current server-wide DNS template are used.

To enable the DNS zone for example.com:

>domain.exe -u example.com -dns true

-www

true|false

Allows/Prohibits accessing the domain using URL with the www prefix.

Is true by default.

To remove the www prefix from example.com:

>domain.exe --update example.com -www false

-hosting

true|false

Enables/Disables hosting.

Is false by default.

To enable hosting -ip, -login options are required.

To enable hosting for the domain example.com:

>domain.exe --update example.com -hosting true -ip 192.0.2.54 -login John -passwd sample

-hst_type

phys|std|frm

Sets up the type of hosting.

Here, phys means physical hosting, std standard forwarding hosting, and frm frame forwarding hosting.

Default value is phys.

To set up standard forwarding hosting on the domain example.com:

>domain.exe --update example.com -hst_type std -login JohnDoe

-target_url

<URL>

Sets the target URL for forwarding hosting types.

Required if the -hst_type option is set to std or frm.

To set up standard forwarding to the target URL sample.com for the domain example.com:

>domain.exe --update example.com -hst_type std -target_url www.sample.com

-template

<string>

Sets the template for domain creation. Used with --create only.

To create the domain example.com basing on "Default Template" for the client with the login name JohnDoe:

>domain.exe --create example.com -owner JohnDoe -ip 192.0.2.54 -template "Default Template"

-force

 

Forces Plesk to create a domain basing on a given template. Used with the -template option only.

To force the creation of the domain example.com based on "Default Template" for the client with the login name JohnDoe:

>domain.exe --create example.com -owner JohnDoe -ip 192.0.2.54 -template "Default Template" -force

-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.exe -c example.com -clogin JDoe -creation-date 2008-12-30

-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.exe -u example.com -maillist_service true

-max-connections

<number>

Limits the number of available connections.

Unlimited is set to -1.

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

>domain.exe -u example.com -max-connections 10

-traffic-bandwidth

<number>

Limits the network use.

Unlimited is set to -1.

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

>domain.exe -u example.com -traffic-bandwidth 500

-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.exe --change-owner example.com -clogin JaneDoe -map_ip 192.0.2.87

-ip

<ip_address>

Specifies the IP address to be associated with new domain.

If the domain is configured for physical hosting, the specified IP address will be used for physical hosting.

To associate IP address 192.0.2.33 with example.com configured for physical hosting:

>domain.exe --create example.com -hosting true -ip 192.0.2.33

-login

<login_name>

Sets the login name for the FTP user having access to the domain files structure.

Required if physical hosting is specified.

To create the FTP user's login for the example.com user, provided that the domain is configured to use physical hosting:

>domain.exe --update example.com -login New_FTP_user

-passwd

<password>

Sets the FTP password.

No password is set by default.

To setup password newpass for accessing example.com files structure via FTP:

>domain.exe --update example.com -passwd newpass

-shell

"Login Disabled"|"Login Enabled"

Enables/Disables access to the system via remote desktop panel (RDP).

Is "Login Disabled" by default.

To enable access to the system via RDP:

>domain.exe --update example.com -shell "Login Enabled"

-hard_quota

<number>[K|M|G]

Sets the maximum amount of disk space available for the domain files.

Unlimited if set to 0.

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

>domain.exe --update example.com -hard_quota 100M

-publish-sb-site

true|false

Enables/Disables the creation and publishing of an empty site by Sitebuilder when creating a new domain for the client with SB support.

Is true by default.

Not to create and publish an empty site when updating example.com:

>domain.exe -u example.com -publish-sb-site false

-fp

true|false

Enables/Disables FrontPage support.

Is false by default.

To enable FrontPage support on example.com:

>domain.exe --update example.com -fp true

-fp_ssl

true|false

Enables/Disables FrontPage Over SSL support.

Is false by default.

To enable FrontPage Over SSL support on example.com:

>domain.exe --update example.com -fp_ssl true

-fpauth

true|false

Enables/Disables FrontPage authorization.

Is false by default.

To enable FrontPage authorization on example.com:

>domain.exe --update example.com -fpauth true

-fp_no_index

true|false

Defines whether FrontPage uses native WAIS search engine, or IIS Index Server for indexing web sites.

Is false by default.

If on Virtuozzo, is true by default.

Available since Plesk 8.1.1.

To make FrontPage use IIS Index Service on example.com:

>domain.exe -u example.com -fp_no_index false

-ssi

true|false

Enables/Disables SSI support.

Is false by default.

To enable SSI support on example.com:

>domain.exe --update example.com -ssi true

-ssi_html

true|false

Enables/Disables SSI support for HTML and HTM files.

Is false by default.

To enable SSI support for HTML and HTM files on example.com:

>domain.exe -u example.com -ssi_html true

-php

true|false

Enables/Disables PHP support.

Is false by default.

To enable PHP support on example.com:

>domain.exe --update example.com -php true

-php_version

4|5

Specifies PHP version.

Is 4 by default.

To set PHP v.5 default on domain example.com:

>domain.exe -u example.com -php_version 5

-php_isapi

true|false

Enables/Disables running PHP as an ISAPI extension.

Is false by default.

Deprecated since Plesk 8.3. Use -php_handler_type instead.

To enable running PHP as an ISAPI extension on domain example.com:

>domain.exe -u example.com -php-isapi true

-php_handler_type

<cgi|fastcgi|isapi>

Specifies PHP support mode.

Is cgi by default.

To enable running PHP as ISAPI extension on example.com:

>domain.exe -u example.com -php_handler_type isapi

-cgi

true|false

Enables/Disables CGI support.

Is false by default.

To enable CGI support on example.com:

>domain.exe --update example.com -cgi true

-perl

true|false

Enables/Disables Perl support.

Is false by default.

To enable Perl support on example.com:

>domain.exe --update example.com -perl true

-asp

true|false

Enables/Disables ASP support.

Is false by default.

To enable ASP support on example.com:

>domain.exe --update example.com -asp true

-python

true|false

Enables/Disables Python support.

Is false by default.

To enable Python support on example.com:

>domain.exe --update example.com -python true

-coldfusion

true|false

Enables/Disables ColdFusion support.

Is false by default.

To enable ColdFusion support on example.com:

>domain.exe --update example.com -coldfusion true

-miva

true|false

Enables/Disables Miva support.

Is false by default.

To enable Miva support on example.com:

>domain.exe --update example.com -miva true

-ssl

true|false

Enables/Disables accessing a domain via SSL.

Is false by default.

To enable SSL support on example.com:

>domain.exe --update example.com -ssl true

-webstat

none|webalizer|awstats|smarterstats|urchin

Sets up which web statistics tool should be used on a domain.

Is none by default.

To set Webalizer used on example.com:

>domain.exe --update example.com -webstat webalizer

-err_docs

true|false

Allows/Prohibits using custom HTTP error messages on a domain.

Is false by default (meaning standard error messages).

To allow custom error documents on example.com:

>domain.exe --update example.com -err_docs true

-write_modify

true|false

Allows/Prohibits granting to the Plesk IIS User the Full access permission for the domain httpdocs/ and httpsdocs/ files and subfolders (may be required for web applications correct functioning, but is insecure).

Is false by default.

Available since Plesk 8.1.1.

To allow Plesk IIS User to write and modify files and subfolders in httpdocs/ and httpsdocs/ folders of example.com:

>domain.exe --update example.com -write_modify true

-iis_app_pool

true|false

Allows/Prohibits using dedicated IIS application pool for a domain.

Is false by default.

To allow using dedicated IIS application pool on example.com:

>domain.exe --update example.com -iis_app_pool true

-cpu_usage

<integer>

Defines the maximum CPU usage by domain (in %).

To limit the maximum CPU usage by example.com to 3%:

>domain.exe -u example.com -cpu_usage 3

-log_rotate

true|false

Enables/Disables log rotation.

Is true by default.

To disable log rotation on example.com:

>domain.exe --update example.com -log_rotate false

-log_bysize

<number>[K|M|G]

Enables/Disables the processing of log files by size (the processing starts once the specified size is achieved).

To enable the processing of example.com log files when their size comes up to 200 KB:

>domain.exe --update sampledomain.com -log_bysize 200K

-log_bytime

daily|weekly|monthly

Enables the processing of log files by time.

Is daily by default.

To set up weekly log rotation on example.com:

>domain.exe --update example.com -log_bytime weekly

-log_max_num

<number>

Specifies the maximum number of stored log files.

Is 3 by default.

To set the maximum number of log files on example.com to 5:

>domain.exe --update exampe.com -log_max_num 5

-log_compress

true|false

Enables/Disables log file compression.

Is true by default.

To disable log file compression on example.com:

>domain.exe --update example.com -log_compress false

-log_email

<email>

Enables sending log files to the specified email address.

To enable sending the log file of example.com to JohnDoe@example.com:

>domain.exe --update example.com -log_email JohnDoe@example.com

-clogin

<login_name>

Specifies the login name of an existing client who possesses a domain.

Required with --create.

Deprecated since Plesk 9.0.

To change an owner of example.com to Jane:

>domain.exe --update example.com -clogin Jane

-mail_service

true|false

Enables/Disables running mail service.

Is false by default.

To disable mail service on example.com:

>domain.exe --update example.com -mail_service false

-notify

true|false

Enables/Disables sending the 'domain created' notification to Plesk administrator.

Is true by default.

To disable sending the notification:

>domain.exe --create example.com -notify false

-asp.net

true|false

Enables/Disables supporting Microsoft ASP.NET framework.

Is false by default.

To enable Microsoft ASP.NET framework support on example.com:

>domain.exe -u example.com -asp.net true

-asp.net_version

1.1|2.0

Sets the default version of Microsoft ASP.NET framework.

Is 1.1 by default.

Available since Plesk 7.5.6.

To make .NET v.2.0.x default on example.com:

>domain.exe -u example.com -asp.net_version 2.0

-sb_subdomains_create

true|false

When creating a new domain for the client with Sitebuilder 3.x support, this option enables/disables creating and publishing two subdomains (blog and photo gallery) by SB.

Is false by default.

Used with --create only.

Available since Plesk 7.6.

Deprecated since Plesk 8.4.

To enable creating and publishing blog, and photo gallery subdomains when creating example.com for a client with SB 3.x support:

>domain.exe --create example.com -sb_subdomains_create true

-fp_smtp_host

<host_name>

Specifies Microsoft FrontPage SMTP server.

By default, the mail server address defined by MX record in the domain's DNS zone is set.

If the MX record is not specified, the parameter is set to localhost.

To set mail.example.com as the FrontPage SMTP server for domain sample.com:

>domain.exe -u sample.com -fp_smtp_host mail.example.com

-fp_mail_from

<email>

Specifies Microsoft FrontPage From address.

By default, the address is set to domain administrator email address. If the domain administrator account is not configured or their email address is not specified, the domain owner's email address is used. If the client's e-mail address is not specified, then the Plesk administrator's address is used.

To set the Microsoft FrontPage From address to admin@example.com:

>domain.exe -u sample.com -fp_mail_from admin@example.com

-fp_mail_reply_to

<email>

Specifies Microsoft FrontPage Reply to address.

By default, the address is set to domain administrator email address. If the domain administrator account is not configured or their email address is not specified, the domain owner's e-mail address is used. If the client's email address is not specified, then the Plesk administrator's address is used.

To set the Microsoft FrontPage mail settings: Reply to address to admin@example.com:

>domain.exe -u sample.com -fp_mail_reply_to admin@example.com

-owner

<login_name>

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

Available since Plesk 9.0.

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

>domain.exe -c example.com -owner JDoe