Advertisement
fduran

Apache optimization: mod_pagespeed

Apr 21st, 2011
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.23 KB | None | 0 0
  1. # apache optimization with Google's mod_pagespeed
  2. # www.fduran.com
  3.  
  4. # Page for mod_pagespeed : http://code.google.com/speed/page-speed/docs/using_mod.html
  5. # Download from http://code.google.com/speed/page-speed/download.html :
  6. cd /usr/local/src
  7. wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.deb
  8. apt-get -f install
  9. dpkg -i mod-pagespeed-*.deb
  10. #
  11. check module is there:
  12. ls -lh /etc/apache2/mods-enabled/pagespeed*
  13.  
  14. # create directives:
  15. nano /etc/apache2/conf.d/pagespeed.conf
  16. #with contents:
  17. <IfModule pagespeed_module>
  18. ModPagespeed on
  19. AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
  20. # comment out after testing is working:
  21. # <Location /mod_pagespeed_statistics>
  22. # Order allow,deny
  23. # Allow from all
  24. # SetHandler mod_pagespeed_statistics
  25. # </Location>
  26. ModPagespeedEnableFilters make_google_analytics_async
  27. ModPagespeedEnableFilters collapse_whitespace
  28. ModPagespeedEnableFilters remove_comments
  29. </IfModule>
  30.  
  31. /etc/init.d/apache2 reload
  32. # check in /mod_pagespeed_statistics page that numbers are different than zero, also that source of page comes "minimized" (no initial spaces)
  33.  
  34. #Also in the response headers for examle from https://www.blamestella.com , you'll see: X-Mod-Pagespeed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement