AutoSSL problem on some accounts

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
Hello,
I am running a WHM 60.0 (build 36) server with autossl enabled on all accounts.

I have 67 accounts in the server.
I have managed to enable https on 7 accounts with no problem adding in their corresponding htaccess file the following lines:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

I have set a primary domain in the autossl settings.

However, in some accounts I cannot enable ssl and I get a certification error that states that the ssl certificate has been set to another domain (my primary).

What can be the problem?
 

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
After some digging in the log files i see that
The system queried for a temporary file at “<a href="mydomain/xxxxxxxxx.txt">mydomain/xxxxxxxxx.txt</a>”, but the web server responded with the following error: 404 (Not Found).

I read in other posts that it maybe due to password protected directories.
I removed the password protect from the directories, now are these files from comodo are going to be repopulated?
 

Axell35

Member
Nov 10, 2006
11
1
153
Probably yes, we had a similar problem but we received 401 error. Removing .htpasswd and editing .htacces accordingly solved the problem for us.

Try clicking "check <user>" after you've made the changes
 

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
Thank you for your answer.
I did remove all password protection from directories,
and i run the check again:

2:31:29 PM This system has AutoSSL set to use “cPanel (powered by Comodo)”.
2:31:29 PM Checking websites for mydomain …
2:31:29 PM The website “mydomain”, owned by mydomain, has no SSL certificate. AutoSSL will attempt to obtain a new certificate and install it.
2:31:29 PM The system will attempt to renew SSL certificates for the following websites:
2:31:29 PM mydomain (mydomain www.mydomain mail.mydomain)

and then again the same WARN:
failed its domain control validation: .....

any other ideas?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
and then again the same WARN:
failed its domain control validation: .....

any other ideas?
Hello,

Feel free to open a support ticket using the link in my signature so we can take a closer look and determine why domain validation is failing for these domain names. You can post the ticket number here and we will update this thread with the outcome.

Thank you.
 

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
We did through my vps technician and the answer from cpanel personnel was that the .htaccess of all the problematic accounts were "incompatible" with Auto SSL. Of cource these .htaccess files are identical to all the other accounts that got their AutoSSL certificate ok.

What now?
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
New We did through my vps technician and the answer from cpanel personnel was that the .htaccess of all the problematic accounts were "incomaptible" with Auto SSL. Of cource these .htaccess files are identical to all the other accounts that got their AutoSSL certificate ok.
Could you check with your provider and ask them to provide you with the ticket number? We'd need to review the ticket to find out more information about why validation failed.

Thank you.
 

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
Hello,
I am running a WHM 60.0 (build 36) server with autossl enabled on all accounts.

I have 67 accounts in the server.
I have managed to enable https on 7 accounts with no problem adding in their corresponding htaccess file the following lines:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

I have set a primary domain in the autossl settings.

However, in some accounts I cannot enable ssl and I get a certification error that states that the ssl certificate has been set to another domain (my primary).

What can be the problem?
Currently using WHM 62.0 (build 15)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Currently using WHM 62.0 (build 15)
Hello,

I'm referring to the support ticket number opened with cPanel, as opposed to the cPanel version number.

Thanks!
 

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
Could you check with your provider and ask them to provide you with the ticket number? We'd need to review the ticket to find out more information about why validation failed.

Thank you.
The ticket number is 8230027
Thank you.
If you want any clarifications i have full knowledge of all the accounts in this vps and their setup (.htaccess & content)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

It looks like the issue was confirmed to relate to the .htaccess, but the specific entry resulting in the issue was not verified. Could you let us know the full contents of the .htaccess file associated with a domain name affected by this issue?

Thank you.
 

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
Hello,

It looks like the issue was confirmed to relate to the .htaccess, but the specific entry resulting in the issue was not verified. Could you let us know the full contents of the .htaccess file associated with a domain name affected by this issue?

Thank you.
I can send you the original .htaccess and the corresponding account name, the problematic accounts is more than one.
Where should I send it? I dont want to post such data in here.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

You can send a copy of the .htaccess file using the CODE tags to me via a private message on the forums.

Thank you.
 
  • Like
Reactions: user4629

user4629

Member
May 25, 2015
21
1
53
Thessaloniki
cPanel Access Level
Root Administrator
To anyone having problems with .htaccess of opencart 2+ and autoSSL the problem was in the line:

<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">

that became in my case in order to succesfully pass the certificate install:

<FilesMatch "(?i)((\.tpl|\.ini|\.log))">


The weird thing was that I had other accounts with the exact same .htaccess that had passed Autossl certification but the above edit did the trick to the problematic accounts.

Thank you cPanelMichael !!!!
 
  • Like
Reactions: cPanelMichael