Google anounced last week release of mod_pagespeed. Pagespeed is an apache module that helps you optimize server side page speed. It will compress and combine your CSS and JavaScript files, optimize caching settings, remove comments and whitespace from your files, optimize images, etc. The good news is that you can install mod_pagespeed as a package in Ubuntu. You do not need to recompile your apache!
Download Page Speed fromĀ here
Lets get started.
dpkg -i mod-pagespeed-*.deb
apt-get -f install
Now we need to configure pagespeed.conf file which is located in /etc/apache2/mods-available/ to turn it on.
On the top of pagespeed.conf file you will see the following:
<IfModule pagespeed_module>
SetOutputFilter MOD_PAGESPEED_OUTPUT_FILTER
ModPagespeed on
Do not do anything if the line ModPagespeed is on like in above example. If it’s off than change off to on, save file and restart apache.
For more configuration options I recommend you to read more hereĀ https://code.google.com/speed/page-speed/docs/using_mod.html