Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
_Version
_Version

Table of Contents
stylenone

Overview

The /usr/local/cpanel/scripts/proxydomains script allows you to create proxy domain Domain Name System (DNS) records for a cPanel, WHM, 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.

Note
titleNote:

You cannot add the cpanel, whm, or webmail proxy subdomains for addon or parked domains. You can only add cpcontacts , cpcalendar , and webdisk proxy subomains to addon and parked domains.

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:

Code Block
languagebash
/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
titleNote:

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
titleNote:

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
titleNote:

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

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

webdisk
--no_replace

Whether to enable replacement of existing records.

Note
titleNotes:
  • 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.

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

1

--ifenabled

Only perform the operation if proxy subdomains are enabled.

N/A

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

Code Block
languagebash
/usr/local/cpanel/scripts/proxydomains add --user=john --subdomain=webdisk --no_replace=0 --force_autodiscover_support=1 --ifenabled

The output resembles the following example:

Code Block
languagebash
Adding proxy subdomains for user john.

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

Additional Records

The /usr/local/cpanel/scripts/proxydomains script adds additional entries to the DNS records if you configure the Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation) setting to On in WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings). When you configure this setting to On , then this script also adds the following entires:

A records for: 

  • autoconfig
  • autodiscover

SRV and TXT records for:

  • _caldav._tcp
  • _caldavs._tcp
  • _carddav._tcp
  • _carddavs._tcp

SRV records for:

  • _autodiscover._tcp

Additional documentation

Localtab Group
Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("domains","dav","dns") and label = "whm" and space = currentSpace()

Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("domains","dav","dns") and label = "cpanel" and space = "ALD"

Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("domains","dav","dns") and label = "whm" and space in (currentSpace(),"CKB")

Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("domains","dav","dns") and space = "SDK"