mod_pagespeed is an apache module that automatically optimizes webpages which are writen in Javascript, HTML, CSS, and images. It does this by rewriting the resources using filters that implement web performance best practices.
Webmasters and web developers can use mod_pagespeed in order to improve the performance of their web pages when serving content with the Apache HTTP Server.
How to install mod_pagespeed on linux dedicated server.
Mod_pagespeed needs mod_deflate to be loaded in Apache.
Following are the steps to install mod_pagespeed with Apache v2.2 + CPanel server running on CentOS 5.5 (32-bit):
[root@server]# cd /usr/src
[root@server src]# wget https://dl-ssl.google.com/dl/linux/d...rrent_i386.rpm
[root@server src]# mkdir mod-pagespeed
[root@server src]# cd mod-pagespeed
[root@server mod-pagespeed]# rpm2cpio ../mod-pagespeed-beta_current_i386.rpm | cpio -idmv
you will get the result as
./etc/cron.daily/mod-pagespeed
./etc/httpd/conf.d/pagespeed.conf
./usr/lib/httpd/modules/mod_pagespeed.so
./var/mod_pagespeed/cache
./var/mod_pagespeed/files
3135 blocks
[root@server mod-pagespeed]# cp ./etc/httpd/conf.d/pagespeed.conf \
/usr/local/apache/conf/
[root@server mod-pagespeed]# cp ./usr/lib/httpd/modules/mod_pagespeed.so \
/usr/local/apache/modules/
[root@server mod-pagespeed]# chmod 755 /usr/local/apache/modules/mod_pagespeed.so
[root@server mod-pagespeed]# mkdir /var/mod_pagespeed/{cache,files} -p
[root@server mod-pagespeed]# chown nobody:nobody /var/mod_pagespeed/*
Now edit /etc/httpd/conf/httpd.conf and add the line
Include “conf/pagespeed.conf”
then edit /usr/local/apache/conf/pagespeed.conf and update the paths as
# vim /usr/local/apache/conf/pagespeed.conf
LoadModule pagespeed_module /usr/src/mod-pagespeed/usr/lib/httpd/modules/mod_pagespeed.so
LoadModule deflate_module modules/mod_deflate.so
Now restart apache service
[root@server mod-pagespeed]# service httpd restart
0 comments:
Post a Comment