Home > apache2 > the incredibly lazy guide to installing mod_pagespeed

the incredibly lazy guide to installing mod_pagespeed

November 12th, 2010 Leave a comment Go to comments
! This post is pretty old.

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.

  1. 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
  2. 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
  3. open up the following file with your favorite editor
    /etc/apache2/mods-available/pagespeed.conf
  4. 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
  5. restart apache
    sudo service apache2 restart
  6. 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.

  1. December 11th, 2015 at 05:19 | #1

    在archlinux终端下使用需要什么额外的设置吗?我在arch使用** (process:1432): WARNING **: Trying to rgiester gtype GMountMountFlags’ as enum when in fact it is of type GFlags’** (process:1432): WARNING **: Trying to rgiester gtype GDriveStartFlags’ as enum when in fact it is of type GFlags’** (process:1432): WARNING **: Trying to rgiester gtype GSocketMsgFlags’ as enum when in fact it is of type GFlags’/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display warnings.warn(str(e), _gtk.Warning)/usr/share/deepin-scrot/src/window.py:27: GtkWarning: IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)’ failed (screenWidth, screenHeight) = gtk.gdk.get_default_root_window().get_size()Traceback (most recent call last): File ./deepinScrot.py , line 25, in from mainscrot import MainScrot File /usr/share/deepin-scrot/src/mainscrot.py , line 28, in from action import * File /usr/share/deepin-scrot/src/action.py , line 25, in from draw import * File /usr/share/deepin-scrot/src/draw.py , line 32, in from window import screenWidth, screenHeight File /usr/share/deepin-scrot/src/window.py , line 27, in (screenWidth, screenHeight) = gtk.gdk.get_default_root_window().get_size()AttributeError: NoneType’ object has no attribute get_size’

  2. January 1st, 2016 at 21:37 | #2

    That’s an apt answer to an interesting question

  1. No trackbacks yet.