Version Installed : 0.10.21.2
Pagespeed requires deflate module, so that should be compiled already with
/scripts/easyapache
Once deflate is enabled, do the following.
-
cd /usr/local/src
-
Check if the server is 32 bit or 64 bit and then download the corresponding pagespeed rpm. You can check it by issuing any of the following commands.
uname –m
or
getconf LONG_BIT
-
mkdir mod-pagespeed
-
cd mod-pagespeed
-
rpm2cpio ../mod-pagespeed-beta_current_x86_64.rpm | cpio –idmv
-
cp etc/httpd/conf.d/pagespeed.conf /usr/local/apache/conf/
-
cp usr/lib64/httpd/modules/mod_pagespeed.so /usr/local/apache/modules/
-
chmod 755 /usr/local/apache/modules/mod_pagespeed.so
-
mkdir /var/mod_pagespeed/{cache,files} –p
-
chown nobody:nobody /var/mod_pagespeed/*
-
Now we need to edit pagespeed.conf to reflect the changes in paths. Before that take a copy of the default pagespeed.conf so that we can revert it any time.
cp -pv /usr/local/apache/conf/pagespeed.conf /usr/local/apache/conf/pagespeed.conf.default
-
vi /usr/local/apache/conf/pagespeed.conf
Modify the lines given below as follows.
LoadModule pagespeed_module /usr/local/apache/modules/mod_pagespeed.so
LoadModule deflate_module /usr/local/apache/modules/mod_deflate.so
ModPagespeedFileCachePath “/var/mod_pagespeed/cache/”
ModPagespeedGeneratedFilePrefix “/var/mod_pagespeed/files/”
-
Save and quit the file. Now we need to include this conf in apache, but being a cpanel server, direct apache conf edits may be rewritten later. So do it as follows.
vi /usr/local/apache/conf/includes/pre_main_global.conf
Add the following line and save the file.
Include “/usr/local/apache/conf/pagespeed.conf”
Now run the apache distiller
/usr/local/cpanel/bin/apache_conf_distiller -–update
/scripts/rebuildhttpdconf
/etc/rc.d/init.d/httpd restart
I’m not sure where you’re getting your info, but good topic.
I needs to spend some time learning much more
or understanding more. Thanks for great info I was looking for this information for my mission.