Lets Encrypt code added to htaccess

danielpmc

Well-Known Member
Nov 3, 2016
78
33
18
usa
cPanel Access Level
Reseller Owner
Hello,

I remember back around Version 64 AutoSSL codes were being added to htaccess automatically. That issue was resolved at least up to version 66.0.23, it appears.

I was recently updated to Version 66.0.24 by my host. I have a WHM/cPanel Reseller plan and server access. Now in my htaccess i am seeing the code below addedd automatically either by cPanel or Lets Encrypt. It appears in all my RewriteCond directives. My htaccess directives have worked well without the code.

Is there a way i can prevent this from being added to my htaccess?

Code:
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/.+$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello,

You (or your reseller provider) can check to see if the following option is enabled under the "Domains" tab in "WHM >> Tweak Settings":

Use a Global DCV Passthrough instead of .htaccess modification (requires EA4)

Per it's description:

When you enable this option, Apache adds global rewrite rules to the webserver configuration so that the system does not process additional rewrite rules for DCV filenames. These global rules make it unnecessary for cPanel & WHM to modify each virtual host’s .htaccess file. Note: When you enable this option, the system receives a trivial performance penalty because all of the HTTP requests must be matched against the DCV filename regular expressions.

Thank you.
 
  • Like
Reactions: danielpmc

danielpmc

Well-Known Member
Nov 3, 2016
78
33
18
usa
cPanel Access Level
Reseller Owner
Hello @cPanelMichael

I contacted my support and this is the reply i got back from the CEO of the company. So i am going to wait until the next cPanel update and see if that fixes the issue, since this just started with the 66.0.24 recent update.

Ticket response from my support:
We already are setup to utilize dcv global passthrough and checking other systems we have they're all set this way. We're going to test the next cPanel update and see if it changes this setting which may suggest a bug where it thinks the system you're on is not compatible with the passthrough setting which we'll then need to discuss with the cPanel team as it is compatible.

Thanks for your help.
 

danielpmc

Well-Known Member
Nov 3, 2016
78
33
18
usa
cPanel Access Level
Reseller Owner
For what its worth:

I have 2 FQDN and 1 subdomain, each installed on their own cPanel with identical RewriteCond directives in each of their htaccess file. The code is being automatically added to only one of the 3 htaccess files. When i delete the codes they just reappear the next day in the same domain.

- FQDN: example123.site - No DCV Codes added as of this post date/time

- FQDN: exampleabc.info - DCV Codes added since cPanel upgraded to Version 66.0.24

- SubDomain: bts.exampleabc.info - No DCV Codes added as of this post date/time
 

danielpmc

Well-Known Member
Nov 3, 2016
78
33
18
usa
cPanel Access Level
Reseller Owner
Hello @cPanelMichael

I contacted my support and this is the reply i got back from the CEO of the company. So i am going to wait until the next cPanel update and see if that fixes the issue, since this just started with the 66.0.24 recent update.

Ticket response from my support:
We already are setup to utilize dcv global passthrough and checking other systems we have they're all set this way. We're going to test the next cPanel update and see if it changes this setting which may suggest a bug where it thinks the system you're on is not compatible with the passthrough setting which we'll then need to discuss with the cPanel team as it is compatible.

Thanks for your help.
Hello,

My host just did a cPanel update and now DCV global passthrough is now functioning as intended. Wether or not the cPanel update 66.0.26 is responsible for fixing the issue is unknown.

I do not have anything else to add, other than this thread request seems to be resolved.

Thanks for your time and suggestions @cPanelMichael
 
  • Like
Reactions: cPanelMichael