Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lets Encrypt code added to htaccess

Discussion in 'Security' started by danielpmc, Oct 12, 2017.

Tags:
  1. danielpmc

    danielpmc Well-Known Member

    Joined:
    Nov 3, 2016
    Messages:
    64
    Likes Received:
    28
    Trophy Points:
    18
    Location:
    Gainesville, Florida
    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)?$
     
  2. Tearabite

    Tearabite Active Member

    Joined:
    Nov 28, 2010
    Messages:
    29
    Likes Received:
    2
    Trophy Points:
    53
    Location:
    Southern California
    cPanel Access Level:
    Root Administrator
    I have this in most of my HTACCESS files as well. Does it cause any issues or problems?
     
  3. Muhammed Fasal

    Joined:
    Aug 9, 2017
    Messages:
    24
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
    These are Comodo entries to exclude DCV checks from HTTP redirections so that the DCV checks complete successfully. I could see another thread regarding similar one, you can check at

    Comodo entries added to htaccess
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    danielpmc likes this.
  5. danielpmc

    danielpmc Well-Known Member

    Joined:
    Nov 3, 2016
    Messages:
    64
    Likes Received:
    28
    Trophy Points:
    18
    Location:
    Gainesville, Florida
    cPanel Access Level:
    Reseller Owner
    Thank you @cPanelMichael

    What you posted makes sense to me. I will open a ticket with my host and post back here a followup.
     
    cPanelMichael likes this.
  6. danielpmc

    danielpmc Well-Known Member

    Joined:
    Nov 3, 2016
    Messages:
    64
    Likes Received:
    28
    Trophy Points:
    18
    Location:
    Gainesville, Florida
    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.
     
  7. danielpmc

    danielpmc Well-Known Member

    Joined:
    Nov 3, 2016
    Messages:
    64
    Likes Received:
    28
    Trophy Points:
    18
    Location:
    Gainesville, Florida
    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
     
  8. danielpmc

    danielpmc Well-Known Member

    Joined:
    Nov 3, 2016
    Messages:
    64
    Likes Received:
    28
    Trophy Points:
    18
    Location:
    Gainesville, Florida
    cPanel Access Level:
    Reseller Owner
    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
     
Loading...

Share This Page