mod_pagespeed includes several filter that optimise JavaScript, HTML and CSS stylesheets. It also includes filters for optimizing JPEG and PNG images. The filters are based on a set of best practices known to enhance web page performance. Webmasters who set up mod_pagespeed in addition to configuring proper caching and compression on their Apache distribution should expect to see an improvement in the loading time of the pages on their websites.
mod_pagespeed currently only supports Apache 2.2.
mod_pagespeed Installation:
Download the latest version of mod_pagespeed (deb file) for Ubuntu system - 32bit | 64bit
To install the packages, on Debian/Ubuntu, please run (as root) the following command:
dpkg -i mod-pagespeed-*.debInstalling mod_pagespeed will add the Google repository so your system will automatically keep mod_pagespeed up to date.
apt-get -f install
After installing mod_pagespeed, it can be customized and configured by editing the Apache configuration file /etc/apache2/mods-enabled/pagespeed.conf
mod_pagespeed Configuration:
Open the mod_pagespeed configuration file using command:
sudo nano /etc/apache2/mods-available/pagespeed.confBelow is my configuration setting, just paste this and restart apache server and you’re good to go.
ModPagespeedEnableFilters combine_cssmod_pagespeed required a disk cache that must be configured to a directory to which httpd has write access. The default configuration file sets this to /var/mod_pagespeed/cache/. To put the cache elsewhere please edit ModPagespeedFileCachePath to the desired location. A quick glance at the Apache error log file, typically in /var/log/apache2/error.log, will indicate whether the current setting is working.
ModPagespeedEnableFilters rewrite_css,rewrite_javascript
ModPagespeedEnableFilters inline_css,inline_javascript
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_img_dimensions
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters extend_cache
ModPagespeedEnableFilters remove_quotes
ModPagespeedDomain http://www.whateveryoursiteis.com
After editing the conf file, you must restart the httpd server:
sudo /etc/init.d/apache2ctl restartTurning OFF mod_pagespeed
To turn off mod_pagespeed completely, insert as the top line of pagespeed.conf and restart your apache server:
ModPagespeed offTurning ON mod_pagespeed
To turn mod_pagespeed ON, insert as the top line of pagespeed.conf and restart your apache server:
ModPagespeed on
You can also download a number of system tests to check the improvement in performance.
2 comments:
Very good article. am looking forward to hear more from you. This blog doing well by introducing new softwares/tools, which helps to webmasters and system administrator on day to day life.
Srinivas
Isn't ModPagespeedDomain suppose to be written without the http:// portion?
Post a Comment