mod_pagespeed setup with WHM & cPanel
to add instructions to apache httpd.conf:
open WHM
go to Apache Configuration
open Include Editor & choose Pre VirtualHost Include
add instructions, ie:
ModPagespeedEnableFilters add_instrumentation
ModPagespeedMessageBufferSize 100000
ModPagespeedStatistics on
ModPagespeedStatisticsLogging on
ModPagespeedLogDir /var/log/pagespeed
ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE
<Location /mod_pagespeed_beacon>
SetHandler mod_pagespeed_beacon
</Location>
<Location /mod_pagespeed_statistics>
Order allow,deny
Allow from 82.234.104.164
SetHandler mod_pagespeed_statistics
</Location>
<Location /pagespeed_admin>
Order allow,deny
Allow from 82.234.104.164
SetHandler pagespeed_admin
</Location>
</IfModule>
ModPagespeedDomain https://www.heritage-de-france.fr
ModPagespeedDomain https://www.heritage-de-france.com
ModPagespeedDomain https://www.2019.heritage-de-france.fr
ModPagespeedDomain https://www.2019.heritage-de-france.com
# Disable rewriting for pagespeed_admin
RewriteCond %{REQUEST_URI} pagespeed_admin/(.*)$
RewriteRule ^ - [L,QSA]
RewriteCond %{REQUEST_URI} mod_pagespeed_beacon/(.*)$
RewriteRule ^ - [L,QSA]
RewriteCond %{REQUEST_URI} mod_pagespeed_statistics/(.*)$
RewriteRule ^ - [L,QSA]
#ModPagespeedLoadFromFile "https://www.my-website.com/" \
# "/home/www.my-website.com/public_html/"
</IfModule>
https://www.my-website.com/pagespeed_admin/cache?purge=/path/to/purge
https://www.my-website.com/pagespeed_admin/