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 Config File Permission Denied

Discussion in 'Security' started by JaredDetroit, Dec 13, 2016.

Tags:
  1. JaredDetroit

    JaredDetroit Registered

    Joined:
    Jan 18, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Sioux Falls, SD
    cPanel Access Level:
    Root Administrator
    I am having issues with AutoSSL not renewing certificates automatically or when being run manually. It looks like permission was denied for opening the 456_pagespeed.conf file and that possibly halted everything. Is there a known conflict with mod_pagespeed or do I need to update permissions on the file to something else? A good portion of my SSL certs are expired right now, which is causing quite a few issue. Is there another log file I need to look at to get more specifics?

    Code:
     5:35:59 PM The website “x.exampledomain.net”, owned by “user”, has a faulty SSL certificate (OPENSSL_VERIFY:0:10:CERT_HAS_EXPIRED ALMOST_EXPIRED AUTOSSL_READY_FOR_RENEWAL). AutoSSL will attempt to replace this certificate.
    5:36:00 PM WARN Apache detected an error in the Rewrite config. <pre>httpd: Syntax error in -C/-c directive: Could not open configuration file /etc/apache2/conf.modules.d/456_pagespeed.conf: Permission denied </pre> Please try again. at /usr/local/cpanel/Cpanel/HttpUtils/Htaccess.pm line 435. ...caught at bin/autossl_check.pl line 264.
    5:36:00 PM The system has completed the AutoSSL check for “user”.
    5:36:00 PM The system has finished checking 1 user.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @JaredDetroit.

    This is an issue with your Apache configuration file that will affect multiple features, not just AutoSSL. The system needs to run the "/scripts/rebuildhttpdconf" command without error. Could you revert the steps you took to enable Mod_PageSpeed with EasyApache 4? Then, verify features such as AutoSSL work properly. At that point, the following thread should help you get started with installing the custom module:

    Installing Google PageSpeed Fails, EA4

    Thank you.
     
  3. JaredDetroit

    JaredDetroit Registered

    Joined:
    Jan 18, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Sioux Falls, SD
    cPanel Access Level:
    Root Administrator
    Thank you for the reply. I was able to execute "/scripts/rebuildhttpdconf" without any errors and when I removed mod_pagespeed, AutoSSL worked properly and issued certificates. Following the link you gave me and the issues section of the github install, I was able to re-install mod_pagespeed. With a default 456_pagespeed.conf, I'm still receiving the same error when I run AutoSSL.

    Is there anywhere else that I can check to see what might be causing this error?

    Code:
     9:29:43 PM WARN Apache detected an error in the Rewrite config. <pre>httpd: Syntax error in -C/-c directive: Could not open configuration file /etc/apache2/conf.modules.d/456_pagespeed.conf: Permission denied </pre> Please try again. at /usr/local/cpanel/Cpanel/HttpUtils/Htaccess.pm line 435. ...caught at bin/autossl_check.pl line 264.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Note the error message you notice with the AutoSSL feature is just a product of the invalid Apache configuration file. The best course of action here is to first ensure your custom Apache module is properly installed. If you can't successfully run /scripts/rebuildhttpdconf after installing the custom module, you can post to the linked PageSpeed thread to seek additional assistance.

    Thanks!
     
  5. JaredDetroit

    JaredDetroit Registered

    Joined:
    Jan 18, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Sioux Falls, SD
    cPanel Access Level:
    Root Administrator
    Before and after I reinstalled mod_pagespeed I am able to run /scripts/rebuildhttpdconf without any errors. I checked the file permissions of the default 456_pagespeed.conf that was installed and they were 640. I changed it to 644 and now it runs AutoSSL without errors. I guess it ended up being an easy fix.

    Thanks for the help.
     
    cPanelMichael likes this.
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
Loading...

Share This Page