Difference between revisions of "Install mod pagespeed for cPanel EA4"
From Acenet Knowledgebase
Docs admin (Talk | contribs) (Installing Mod_PageSpeed for EasyApache 4 / Apache 2,4) |
Docs admin (Talk | contribs) m (Docs admin moved page Install PageSpeed for cPanel EA4 to Install mod pagespeed for cPanel EA4 without leaving a redirect) |
(No difference)
|
Latest revision as of 02:09, 12 January 2018
How to install mod_pagespeed on a cPanel server running EasyApache 4
Enter the following command to edit a new macro file:
nano /etc/rpm/macros.apache2
Within this file, copy and paste the following 8 lines to the file, and save.
%_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
Next, run the following commands to build the apache module and add to EasyApache 4.
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
/etc/init.d/httpd restart
Mod_pagespeed should now be installed, and you can verify this by running EasyApache 4 and checking the apache module section for it.