SOLVED "Optimize Website" (mod_deflate) refuses to enable (no error)

jcwacky

Active Member
Sep 4, 2002
30
2
158
In cPanel > Optimize Website, I'm unable to enable the "Compress All Content" option.

Upon selecting it, and clicking "Update Settings", it says it was successful: "Website optimization preferences updated. Content compression is now enabled. Content compression is now enabled for all content."

But when I go back to the "Optimize Website" screen, it shows it's still disabled.
  • It happens on all cPanel accounts on the server.
  • I've reproduced the issue on a newly created cPanel account.
  • The "Compress the specified MIME types" won't enable either.
  • I've recently upgraded from EasyApache 3 to EasyApache 4.
  • I've tried uninstalling and re-installing the mod_deflate module via EasyApache 4.
  • It seems to successfully create a .htaccess file in the account root but doesn't add anything to it.
  • If I delete the .htaccess file and try again, it still just creates a new empty .htaccess file.
  • Some accounts already have it enabled, and the compression is working fine with these accounts.
  • WHM 62.0 (build 16) - 11.62.0.16
  • CLOUDLINUX 6.8 x86_64 kvm
Any ideas how I can resolve this?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463

jcwacky

Active Member
Sep 4, 2002
30
2
158
Thanks, but I don't believe that's the same issue. For me, it won't insert the .htaccess content and despite saying it's enabled, when you go back, it says it's still disabled.

I did try that PHP INI update, but it hasn't resolved this issue.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

Do you notice any error messages in /usr/local/cpanel/logs/error_log when attempting to enable the option?

Thank you.
 

jcwacky

Active Member
Sep 4, 2002
30
2
158
Nope, no errors appear in /usr/local/cpanel/logs/error_log, the only file that updates in that directory when attempting to enable Optimisation is access_log.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

jcwacky

Active Member
Sep 4, 2002
30
2
158
I had buycpanel.com support get to the bottom of this. In case anyone else experiences the same issue, it seemed to be caused by file permissions of mod_pagespeed:
The issue here is that your file /etc/apache2/conf.modules.d/456_pagespeed.conf had incorrect file permissions causing the process to fail when it tried to read this file. The file permissions were set to 640, but since this process runs as the cPanel user, the file permissions need to be 644 like all the other configuration files in this directory.
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.