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.

mod_pagespeed errors

Discussion in 'EasyApache' started by Bashed, Jun 28, 2017.

Tags:
  1. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    100
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Enabled mod_pagespeed in EA4 (on CloudLinux)

    Rapid logging in apache logs like the below, what's the fix?

    Code:
    Failed to make directory /var/mod_pagespeed/cache/rname: Permission denied
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. opt2bout

    opt2bout Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    156
    Just an FYI, in the latest CURRENT (64) build, mod_pagespeed will install and operate after you make a few post-installation changes:

    chgrp nobody /var/mod_pagespeed/
    chmod g+w /var/mod_pagespeed/

    EA4 creates the pagespeed cache directory, but assigns ownership to root (which doesn't work for our configuration with apache running as nobody).

    As noted on Github, the pagespeed.conf file is located in /etc/apache2/conf.modules.d/456_pagespeed.conf

    We are running Apache, HTTP2, MPM Event, and PHP-FPM/FastCGI from the EA4 install and things are working.

    BTW build 33 updates the apache vhost templates to correct for the .user.ini directory traversal so no longer need to create .local overrides
     
  4. splaquet

    splaquet Member

    Joined:
    Sep 24, 2008
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    53
    Location:
    Springfield, Massachusetts, United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    opt2bout, i had a quick question about your post. all of a sudden i started seeing a few server issues and noticed that pagespeed was throwing some errors. i found that the permissions had changed on the dirs, so i updated them as above.

    (BTW, I have my files located in /var/cache/mod_pagespeed/, but i'm referencing your location above)

    1) is it chgrp or chown?
    chgrp nobody /var/mod_pagespeed/
    or
    chown nobody:nobody /var/mod_pagespeed/

    2) since it's a previous install, should it also be -R to recursively hit all of the current files/folders?

    3) does this method have to be run manually every time there's an upgrade applied or is there a way to slide it into the config or cron, where it'd run the commands every time that the pagespeed.conf is loaded?

    thank you in advance!
     
    #4 splaquet, Aug 22, 2017
    Last edited: Aug 22, 2017
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Keep in mind that mod_pagespeed will not work properly with per-user MPMs (e.g. MPM ITK). This is something we'll document (and likely create a package conflict for during the install process) once Mod_Pagespeed is no longer in the experimental phase.

    Thank you.
     
  6. splaquet

    splaquet Member

    Joined:
    Sep 24, 2008
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    53
    Location:
    Springfield, Massachusetts, United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    i currently have CloudLinux w/ lsapi, using worker.

    i've had pagespeed installed for nearly a year on this server in particular.
     
    #6 splaquet, Aug 22, 2017
    Last edited: Aug 22, 2017
  7. opt2bout

    opt2bout Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    156
    The commands are verbatim of what I did to get pagespeed to work in my configuration after the EA4 installation script ran.

    With servers that I experimented with before pagespeed was an option in EA4 my cache directory wasn't in the same location as where EA4's install script created it--so I didn't have anything pre-existing (because once EA4 installed mod_pagespeed, the directory structure didn't have the rights to do anything there until I made the changes documented).

    If you are migrating to EA4 installation of mod_pagespeed, I would assume your pagespeed cache folder would also be empty until you assigned the appropriate rights for apache to write to it ???

    As far as updates go, all of my systems have been updated several times since. A few of them running the new 66 build, and I've not gone back to make any changes since. I have not tested removing pagespeed and reinstalling it via EA4 with 66 though.
     
Loading...

Share This Page