SOLVED AutoSSL update error

OttoM

Member
Apr 4, 2018
19
4
3
UK
cPanel Access Level
Root Administrator
Hello,

I have 2 accounts on my cpanel, first one is maindomain.com and second one is otherdomain.com.
I use otherdomain.com to show the same website as maindomain.com. I do this by editing the Pre VirtualHost configuration file and basically say that otherdomain.com has as DocumentRoot the maindomain.com public_html folder. This works fine and both domains use cPanels AutoSSL powered by Comodo.
The problem comes when the AutoSSL expires and cPanel tries to auto update it. The problems is with the otherdomain.com as maindomain.com is updating fine. As you understand due to changing document root of otherdomain.com, part of the autossl update process is to perform Domain Control Validation which is fails.
Log file reports:
Code:
WARN Local HTTP DCV error (otherdomain.com): The system queried for a temporary file at “http://otherdomain.com/.well-known/pki-validation/63D16D5CBAC61253BD756AC8A7BAGGGG.txt”, but the web server responded with the following error: 404 (Not Found). A DNS (Domain Name System) or web server misconfiguration may exist.
To overcome this I remove the DocumentRoot configuration of otherdomain.com in the Pre VirtualHost file. That means website goes down. Then I perform cPanel's AutoSSL update manually and then change back the DocumentRoot to what it was.

My question is Is there a way to make AutoSSL update without changing Pre VirtualHost configuration file? I know some people will probably say that this is not much trouble but let's say that I have more otherdomains.com that work the same way.


complete error log
Code:
WARN Local HTTP DCV error (otherdomain.com): The system queried for a temporary file at “http://otherdomain.com/.well-known/pki-validation/63D16D5CBAC61253BD756AC8A7BAGGGG.txt”, but the web server responded with the following error: 404 (Not Found). A DNS (Domain Name System) or web server misconfiguration may exist.
WARN Local HTTP DCV error (www.otherdomain.com): “www.otherdomain.com” does not resolve to any IPv4 addresses on the internet.
WARN Local HTTP DCV error (mail.otherdomain.com): “mail.otherdomain.com” does not resolve to any IPv4 addresses on the internet.
WARN Local HTTP DCV error (cpanel.otherdomain.com): “cpanel.otherdomain.com” does not resolve to any IPv4 addresses on the internet.
WARN Local HTTP DCV error (webdisk.otherdomain.com): “webdisk.otherdomain.com” does not resolve to any IPv4 addresses on the internet.
WARN Local HTTP DCV error (webmail.otherdomain.com): “webmail.otherdomain.com” does not resolve to any IPv4 addresses on the internet.
10:08:35 AM ERROR Local DNS DCV error (otherdomain.com): The DNS query to “_cpanel-dcv-test-record.otherdomain.com” for the DCV challenge returned no “TXT” record that matches the value “_cpanel-dcv-test-record=EvudvD2AIJ4YrU5T1i9oMwGI0z3rJpDiM3WuV6Q0dRPytHnQdLYNaBH19kQCNwlf”.
ERROR Local DNS DCV error (www.otherdomain.com): The DNS query to “_cpanel-dcv-test-record.otherdomain.com” for the DCV challenge returned no “TXT” record that matches the value “_cpanel-dcv-test-record=EvudvD2AIJ4YrU5T1i9oMwGI0z3rJpDiM3WuV6Q0dRPytHnQdLYNaBH19kQCNwlf”.
ERROR Local DNS DCV error (mail.otherdomain.com): The DNS query to “_cpanel-dcv-test-record.otherdomain.com” for the DCV challenge returned no “TXT” record that matches the value “_cpanel-dcv-test-record=EvudvD2AIJ4YrU5T1i9oMwGI0z3rJpDiM3WuV6Q0dRPytHnQdLYNaBH19kQCNwlf”.
ERROR Local DNS DCV error (cpanel.otherdomain.com): The DNS query to “_cpanel-dcv-test-record.otherdomain.com” for the DCV challenge returned no “TXT” record that matches the value “_cpanel-dcv-test-record=EvudvD2AIJ4YrU5T1i9oMwGI0z3rJpDiM3WuV6Q0dRPytHnQdLYNaBH19kQCNwlf”.
ERROR Local DNS DCV error (webdisk.otherdomain.com): The DNS query to “_cpanel-dcv-test-record.otherdomain.com” for the DCV challenge returned no “TXT” record that matches the value “_cpanel-dcv-test-record=EvudvD2AIJ4YrU5T1i9oMwGI0z3rJpDiM3WuV6Q0dRPytHnQdLYNaBH19kQCNwlf”.
ERROR Local DNS DCV error (webmail.otherdomain.com): The DNS query to “_cpanel-dcv-test-record.otherdomain.com” for the DCV challenge returned no “TXT” record that matches the value “_cpanel-dcv-test-record=EvudvD2AIJ4YrU5T1i9oMwGI0z3rJpDiM3WuV6Q0dRPytHnQdLYNaBH19kQCNwlf”.
Analyzing “otherdomain.com”’s DCV results …
10:08:35 AM ERROR Impediment: TOTAL_DCV_FAILURE: Every domain failed DCV.

Code:
CentOS Linux release 7.5.1804 (Core)
11.74.0.9
vmware
release
thank you in advance
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,764
319
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
I may not be understanding your complete set up, but based on what I am reading, why not simply attach otherdomain.com as a domain alias to maindomain.com in the same account? That would accomplish what you want, and enable the AutoSSL to work fine.
 

OttoM

Member
Apr 4, 2018
19
4
3
UK
cPanel Access Level
Root Administrator
hi GOT,

Your suggestion sounds good and makes sense. Never done this before so I'm not sure how easy it is.
I will give this a try.
Any suggestions on steps to follow are welcome.

thanks so much
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,764
319
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
All you have to do is terminate the account in whm and then add the domain under domain alias in the cpanel for the main domain

Be advised that by terminating the account that you're going to remove any customizations or web files you might have had there. In particular if you've got any email accounts set up or custom dns entries those would need to be recreated after you add it as an alias
 
  • Like
Reactions: OttoM and Infopro

OttoM

Member
Apr 4, 2018
19
4
3
UK
cPanel Access Level
Root Administrator
Hi GOT,

Thanks for the info. I did it with an unused secondary domain as a test and it did work fine. Basically I pointed the secondary domain using the 2 custom nameservers to point it to the server. Then, as you said, i went to Aliases in maindomain's cPanel and I created a new alias. Worked Great. I had to wait a little bit for the AutoSSL to do its update.

Now how would I make it work for a subdomain of the secondary domain?
So basically what I did so far is have otherdomain.com as an alias of maindomain.com
How would I go to have sub.otherdomain.com as an alias of maindomain.com ?
Is it done through a DNS zone edit?

thanks so much
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,764
319
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
You can add a subdomain of the alias domain in the sub domains section in the cpanel of the main domain. It will ask you where you want the document root to point to for that domain.
 
  • Like
Reactions: OttoM