“mod_pagespeed speeds up your site and reduces page load time. This open-source Apache HTTP server module automatically applies web performance best practices to pages, and associated assets (CSS, JavaScript, images) without requiring that you modify your existing content or workflow.”
Steps to install
cd /root yum install at wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
rpm -i --nodeps mod-pagespeed-stable_current_x86_64.rpm
Now we have to edit some files.
/etc/httpd/conf/extra/httpd-includes.conf
add this line: Include /etc/httpd/conf.d/pagespeed.conf
/etc/httpd/conf/httpd.conf
remove this line or comment it: Include conf/extra/httpd-deflate.conf
Make sure there is no ‘setoutputfilter’ line in your .htaccess file, this will interfere with mod_pagespeed.
Now restart httpd and see if you’ve got the module loaded:
service httpd restart apachectl -t -D DUMP_MODULES
Check if you see “pagespeed_module (shared)” loaded.