Igor Simic
6 years ago

How to install mod_pagespeed to WHM easyapache 4


Apache module pagespeed is open source webservers module that optimize your page automatically. It is improving web page speed lad automatically using many filters such as 
...
Full list of filters can be found here.

So, to install mod_pagespeed (CentOS) you have to follow these steps in server command line:
yum install rpm-build cpio ea-apache24-mod_version

wget https://github.com/pagespeed/cpanel/raw/master/EA4/ea-apache24-mod_pagespeed-latest-stable.src.rpm

rpmbuild --rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm

rpm -ivh /root/rpmbuild/RPMS/x86_64/ea-apache24-mod_pagespeed*.rpm

service httpd restart

Next, crete a file  macros.apache2 in /etc/rpm/ and paste this code there:
%_httpd_mmn 20120211x8664
%_httpd_apxs /usr/bin/apxs
%_httpd_dir /etc/apache2
%_httpd_bindir %{_httpd_dir}/bin
%_httpd_modconfdir %{_httpd_dir}/conf.modules.d
%_httpd_confdir %{_httpd_dir}/conf.d
%_httpd_contentdir /usr/share/apache2
%_httpd_moddir /usr/lib64/apache2/modules

after that restart server one more time
service httpd restart


And now if you login to your WHM and go to Software »EasyApache  you should be able to see mod_pagespeed module installed and ready to use
WHM screenshot



Configuration file can be found /etc/apache2/conf.modules.d  named as pagespeed.conf
and you can find more details about it here