SOLVED Create webmail.domain.tld using service domains for existing account.

Jan 10, 2020
11
1
3
USA
cPanel Access Level
Root Administrator
Hi,

I have access to WHM and cPanel. I want to create a subdomain https://webmail.domain.tld/ to access https://domain.tld:2096/. I need to do this as our company policies changed this year and now they block ports including 2096.

We have to now make webmail accessible on port 443. I researched and found service subdomains can do this but it says it will create service subdomains for new accounts.

How can I achieve this for existing account?

Thanks in advance.

-B/R,
Tejas
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Hello,

You can enable service subdomains for all accounts via the command line interface with the following:

Code:
/scripts/servicedomains add
This will enable all the service domains for all domains


Code:
/scripts/servicedomains --help
Will give you available usage flags
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Actually, that's the problem. No changes to DNS you make locally (like the addition of the service subdomains) will work or have any effect. You need to create the proxy/service subdomains where DNS is hosted for your domain and direct their A records to the server.
 
Jan 10, 2020
11
1
3
USA
cPanel Access Level
Root Administrator
I verified that the webmail subdomain is there in the DNS record and it has a A record to the server of the IP. I double checked it with dnschecker.org and it does point to the correct IP.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Can you show me what you have in tweak settings for the following:

service_subdomains.png


What (if any) redirects are in place on the server? These can be found in the .htaccess for the domain or WHM>>Service Configuration>>Apache Configuration>>Include Editor for server wide modifications (there are also account-specific modifications but in most cases you'd know if you'd added these)
 
Jan 10, 2020
11
1
3
USA
cPanel Access Level
Root Administrator
I have redirects for www to non-www and http to https in .htaccess file for the account. I checked in WHM>>Service Configuration>>Apache Configuration>>Include Editor for Pre Main Include, Pre Virtual Host Include and Post Virtual Host Include, it is blank for global as well as for Apache version 2.4.37. Please find attached the screenshot of Tweak settings in WHM.
 

Attachments

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
You have service subdomains set to off in Tweak Settings - can you toggle this to "On" -> Click Save then run:

Code:
/scripts/servicedomains add
Then, let me know if they function again?