Click here to see your recently viewed pages and most viewed pages.

Build ngx_pagespeed From Source

To install our dependencies, run:

RedHat, CentOS, or Fedora
sudo yum install gcc-c++ pcre-dev pcre-devel zlib-devel make unzip
Ubuntu or Debian
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip

Then download ngx_pagespeed:

unzip release-${NPS_VERSION}
cd ngx_pagespeed-release-${NPS_VERSION}-beta/
tar -xzvf ${NPS_VERSION}.tar.gz  # extracts to psol/

Download and build nginx with support for pagespeed:

# check for the latest version
tar -xvzf nginx-${NGINX_VERSION}.tar.gz
cd nginx-${NGINX_VERSION}/
./configure --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}-beta
sudo make install

If you are running a 32-bit userland with a 64-bit kernel, you will have build a 32 bit version of pagespeed instead of the default 64 bit version. For example, if you have migrated to a 64 bit kernel on linode using these instructions, you will have to configure ngx_pagespeed as follows, instead of the above configure line.

setarch i686 ./configure --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}-beta

If this doesn't work for you, please let us know. You can post on our discussion group or file a bug.

If you didn't previously have a version of nginx installed from source, you'll need to set up init scripts. See

Next: module configuration.