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.

AutoSSL Error

Discussion in 'Security' started by keencs, Jul 20, 2017.

Tags:
  1. keencs

    keencs Member

    Joined:
    Feb 16, 2013
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I am receiving the error below with AutoSSL on multiple domains. I am uncertain why and have tried everything I can think of to resolve. The error is not very clear. Has anyone ever seen this or know how to resolve?

    This seems to indicate a problem with the .htaccess file, but the file functions perfectly. I also added access for AutoSSL to get through the RequireAny.

    Code:
    [SIZE=3][B]Log for the AutoSSL run for “user”: Thursday, July 20, 2017 3:33:36 PM GMT-0500 (Let’s Encrypt™)[/B][/SIZE]
     3:33:36 PM This system has AutoSSL set to use “Let’s Encrypt™”.
     3:33:36 PM Checking websites for “user” …
     3:33:36 PM The website “domain.com, owned by “user”, has a faulty SSL certificate (OPENSSL_VERIFY:0:18:DEPTH_ZERO_SELF_SIGNED_CERT NOT_ALL_DOMAINS). AutoSSL will attempt to replace this certificate.
     3:33:37 PM WARN Apache detected an error in the Rewrite config. <pre>AH00526: Syntax error on line 121 of /home/user/public_html/.htaccess.2eyxJsegWkooi3vsDaOd8FShnvsp9rEE: &lt;RequireAny&gt; directive contains no authorization directives </pre> Please try again. at /usr/local/cpanel/Cpanel/HttpUtils/Htaccess.pm line 407.
     3:33:37 PM The system has completed the AutoSSL check for “user”.
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Looks like an issue with your .htaccess

    Syntax error on line 121 of /home/user/public_html/.htaccess

    Can you paste that and the surrounding lines
     
  3. keencs

    keencs Member

    Joined:
    Feb 16, 2013
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    That is what i thought too, but can't find anything wrong. Apache has no problems with it and works fine. Just seems to be the cPanel script that throws a fit..

    Line 121 is actually a comment line:
    Code:
        # Allow from dynamic IPv6 host: something.somthing.com /56
    
    The surrounding lines are:
    Code:
    <RequireAny>
        # Allow from dynamic IPv4 host: cable.home-office.something.com
        Require ip 184.30.111.179
        # Allow from dynamic IPv6 host: something.something.com /56
        Require ip 2605:a000:1111:1111:1111:9e9d:eb0f:f56a/56
        # Allow from dynamic IPv6 host: something.something2.com /64
        Require ip 2605:a000:1111:1111:1111:cbff:fe25:4516/64
    </RequireAny>
    
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,629
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I suppose the easy answer is, remove that htaccess, and run the SSL update to get the cert installed.
     
  5. keencs

    keencs Member

    Joined:
    Feb 16, 2013
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    That works, but doesn't solve the problem and isn't a long term solution. This is occurring for ~20 accounts on multiple servers...
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,629
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  7. keencs

    keencs Member

    Joined:
    Feb 16, 2013
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I don't think this has much to do with my issue. My .htaccess file is working great and functions as expected.

    AutoSSL is the issue here - it seems to be reading the .htaccess file when requesting a new SSL certificate (not sure why) and errors out because it doesn't like something in the file.
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,629
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Is it? I offered the docs for the code you're using in your htaccess file assuming you might want to check to make sure you can add those lines as you have them. As they are, cPanel's AutoSSL doesn't like them for some reason.

    AutoSSL isn't an issue, that's how it works. There is a new option in Tweak setting you might like to know about:

    WebHost Manager »Server Configuration »Tweak Settings, Domains tab:

    HTH!
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,629
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Does removing just the comment lines make any difference?
     
Loading...

Share This Page