Created
February 20, 2012 18:24
-
-
Save fduran/1870492 to your computer and use it in GitHub Desktop.
Apache optimization with Google's mod_pagespeed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apache optimization with Google's mod_pagespeed | |
# www.fduran.com | |
# Page for mod_pagespeed : http://code.google.com/speed/page-speed/docs/using_mod.html | |
# Download from http://code.google.com/speed/page-speed/download.html : | |
cd /usr/local/src | |
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.deb | |
apt-get -f install | |
dpkg -i mod-pagespeed-*.deb | |
# | |
check module is there: | |
ls -lh /etc/apache2/mods-enabled/pagespeed* | |
# create directives: | |
nano /etc/apache2/conf.d/pagespeed.conf | |
#with contents: | |
<IfModule pagespeed_module> | |
ModPagespeed on | |
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html | |
# comment out after testing is working: | |
# <Location /mod_pagespeed_statistics> | |
# Order allow,deny | |
# Allow from all | |
# SetHandler mod_pagespeed_statistics | |
# </Location> | |
ModPagespeedEnableFilters make_google_analytics_async | |
ModPagespeedEnableFilters collapse_whitespace | |
ModPagespeedEnableFilters remove_comments | |
</IfModule> | |
/etc/init.d/apache2 reload | |
# check in /mod_pagespeed_statistics page that numbers are different than zero, also that source of page comes "minimized" (no initial spaces) | |
#Also in the response headers for examle from https://www.blamestella.com , you'll see: X-Mod-Pagespeed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment