Introduction
Below is the full instruction on how to disable mod_pagespeed globally, so that you can enable mod_pagespeed on a per domain's basis.
Procedure
1. First make a copy of the original mod_pagespeed's configuration, you would need to look inside the folder: /etc/apache2/conf.modules.d/ and locate XXX_pagespeed.conf.
For example below:
# find /etc/apache2/conf.modules.d -type f -iname "*_pagespeed.conf"
/etc/apache2/conf.modules.d/510_pagespeed.conf
From the above output, you will see that the file name is called 510_pagespeed.conf.
You will make a copy by the command below:
cp /etc/apache2/conf.modules.d/510_pagespeed.conf /etc/apache2/conf.modules.d/510_pagespeed.conf.backup
2. Edit the pagespeed.conf with your favorite editor
<IfModule pagespeed_module>
ModPagespeed off
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/default/"
ModpagespeedLogDir /var/log/pagespeed/default/
ModPagespeedMessageBufferSize 100000
ModPagespeedEnableCachePurge on
The <IfModule pagespeed_module> section is in the default config file and you need to change ModPageSpeed value to off and optionally change the value ModPagespeedFileCachePath.
ModpagespeedLogDir, ModPagespeedMessageBufferSize and ModPagespeedEnableCachePurge are not set by default, therefore, you will need to add them manually.
3. Once the modification has been completed, you will need to restart HTTPD:
/scripts/restartsrv_httpd
To enable mod_pagespeed for individual domain:
You can easily enable mod_pagespeed on any domain by simply adding the following to it's .htaccess file:
<IfModule pagespeed_module>
ModPagespeed on
</IfModule>
Comments
0 comments
Article is closed for comments.