ModPagespeed off command no longer works in .htaccess
I'm running WHM v96.09 along with Mod PageSpeed version 1.14.36.1-2.2.4.cpanel, originally installed via EasyApache 4.
There are several sites which I prevent the module from running on using the following code in the root .htaccess file (as referenced at the bottom of
Header set Cache-Control "max-age=604800, public"
# No need for the .php extension
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ $1.php
# All URLs should be secure HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://mysite.com/$1 [R=301,L]
ModPagespeed off
AuthType Basic
AuthName "Mysite"
AuthUserFile "/home/mysite/.htpasswds/public_html/passwd"
require valid-user
# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php74" package as the default "PHP" programming language.
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit
This has always worked perfectly, that is until this morning. Now the 'ModPagespeed off' command in each domain's .htaccess file has no effect and Mod Pagespeed is running on all sites. Have restarted Apache + PHP-FPM but it didn't help. Does anyone have any ideas?
This has always worked perfectly, that is until this morning. Now the 'ModPagespeed off' command in each domain's .htaccess file has no effect and Mod Pagespeed is running on all sites. Have restarted Apache + PHP-FPM but it didn't help. Does anyone have any ideas?
-
Hi cPJustinD PHP-FPM was indeed disabled, thanks for the heads-up. I ran the scripts and the previous FPM customizations came across with the exception of one domain. I managed to figure out the settings easily enough. All domains are running PHP-FPM now. So that's one problem out the way but the .htaccess file still has no effect and Mod Pagespeed is running on all sites (i.e I can't disable per domain via .htaccess). Do you have any further ideas? 0 -
This was quite a strange issue... Going to MultiPHP Manager -> User Domain Settings, making a change and clicking update was enough to get this working again. I did also restart Apache + PHP-FPM for good measure. I thought I tried that earlier, but anyway I got it working :) 0 -
I'm glad to hear that you were able to get that resolved! Let us know if you need anything else. Thank you for choosing cPanel! 0
Please sign in to leave a comment.
Comments
5 comments