the incredibly lazy guide to installing mod_pagespeed
November 12th, 2010
You hate reading? you want to try out mod_pagespeed? you run a ubuntu or other debian based server? Well then just follow the following steps.
- get the binary package based on your architecture. (to check which one run “uname -m”. If it says x86_64, they you have a 64bit server)
- 64 bit.
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb
- 32 bit.
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.deb
- 64 bit.
- install the package (substitute am64.deb with i386.deb if you don’t have a 64bit version)
sudo dpkg -i mod-pagespeed-beta_current_amd64.deb
- open up the following file with your favorite editor
/etc/apache2/mods-available/pagespeed.conf
- add all the cool features you want, i currently run this. (line 47 in the file, but it doesn’t really matter)
ModPagespeedEnableFilters collapse_whitespace,elide_attributes ModPagespeedEnableFilters combine_css,rewrite_css,move_css_to_head,inline_css ModPagespeedEnableFilters rewrite_javascript,inline_javascript ModPagespeedEnableFilters rewrite_images,insert_img_dimensions ModPagespeedEnableFilters extend_cache ModPagespeedEnableFilters remove_quotes,remove_comments
- restart apache
sudo service apache2 restart
- done.
I haven’t fully looked into mod_pagespeed and all its filters and implications there of myself, but I always like following these kinds of lazy quick guides myself to start poking around instead of actually reading something for a change. So i figured I should just make one as well.