Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 58

Overview

The /usr/local/cpanel/scripts/proxydomains script allows you to create the DNS records for a cPanel or Webmail account from the command line.

This script adds the required subdomains to the main domain's DNS record, but does not create a VirtualHost entry in the httpd.conf file.

For more information, read our Tweak Settings - Domains documentation.

Run the /scripts/proxydomains script.

To run the /usr/local/cpanel/scripts/proxydomains script from the command line as the root user, use the following format:

/usr/local/cpanel/scripts/proxydomains [action] [options]

You can use either of the following actions:

ActionDescription
addCreate a proxy subdomain.
removeRemove a proxy subdomain.

 

The following table lists the options that you can pass with this script:

Option
Description
Example
--user

The cPanel user's domains to configure.

Note:

If you do not specify a user, this script attempts to configure the proxy subdomains for all of the server's cPanel accounts.

john
--domain

The domain that you wish to configure.

Note:

If you do not specify a domain, this script attempts to configure the proxy subdomains for all of the server's cPanel accounts.

example.com
--subdomain

The proxy subdomain that you wish to configure.

Note:

If you do not specify a subdomain, the script adds or removes the following subdomains:

  • cpanel.example.com
  • whm.example.com
  • webdisk.example.com
  • webmail.example.com

webdisk.example.com
--no_replace

Whether to enable replacement of existing records.

Notes:

  • Always pass 0 as this option's value.
  • Only use this option to change Autodiscover hosts.

0
--old_autodiscover_host

The Autodiscover host that you previously configured.

 

autodiscover.example.com
--force_autodiscover_support

Whether the script should function as if Autodiscover support is not disabled, even if it is disabled.

Notes:

  • Always pass 1 as the value for this option.
  • Use this option to remove the domain's Autodiscovery proxy subdomins after you disable their support.

1

For example, to add the proxy subdomain webdisk.example.com for the cPanel user john, run the following command:

/usr/local/cpanel/scripts/proxydomains add --user=john --subdomain=webdisk.example.com --no_replace=0 --force_autodsicover_support=1

The output resembles the following example:

Adding proxy subdomains for user john.

The options that you pass to the command determine its output.

  • No labels