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.

SOLVED AutoSSL Failure due to .htaccess

Discussion in 'Security' started by jmartinmds, Aug 18, 2017.

Tags:
  1. jmartinmds

    jmartinmds Member

    Joined:
    Jul 22, 2016
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Maryland
    cPanel Access Level:
    DataCenter Provider
    Hello,

    I'm having an issue with getting autossl to run on a site. The error I'm getting in the logs is:

    WARN Apache detected an error in the Rewrite config. <pre>httpd: Syntax error on line 252 of /home/*******/public_html/.htaccess.A1GP_0OUyeAgh01U25cxz9WTTRwynrsy: &lt;/Directory&gt; without matching &lt;Directory&gt; section </pre> Please try again. at /usr/local/cpanel/Cpanel/HttpUtils/Htaccess.pm line 407.

    I've tried running it several times and no luck. There was another forum post that suggested commenting out lines in .htaccess that had to do with https but that didn't work. The permissions for .htaccess and the public_html folder are correct. The .htaccess file is rather long and complex (this is a big site) and I'd like to do as little muddling in there as possible. Currently the site does not force over to www, if that makes a difference.

    I'm running this on 64.0 with the native AutoSSL - Let's Encrypt module.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,080
    Likes Received:
    1,364
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you enable the "Use a Global DCV Passthrough instead of .htaccess modification (requires EA4)" option under the "Domains" tab in "WHM >> Tweak Settings" and let us know if domain validation attempts continue to fail?

    Thank you.
     
    jmartinmds likes this.
  3. jmartinmds

    jmartinmds Member

    Joined:
    Jul 22, 2016
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Maryland
    cPanel Access Level:
    DataCenter Provider
    That worked! Thanks!
     
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,080
    Likes Received:
    1,364
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see that worked well. Thank you for updating us with the outcome.
     
Loading...

Share This Page