Skip to content

Instantly share code, notes, and snippets.

@zoghal
Forked from e7d/nginx-stable-with-pagespeed.sh
Last active August 29, 2015 14:17
Show Gist options
  • Save zoghal/6a2b5bb9db8652804663 to your computer and use it in GitHub Desktop.
Save zoghal/6a2b5bb9db8652804663 to your computer and use it in GitHub Desktop.
SRC=/usr/src
NPS_VERSION=1.9.32.3
NGINX_VERSION=1.7.10 # stable=1.6.2, mainline=1.7.10
cd $SRC
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip
unzip release-${NPS_VERSION}-beta.zip
cd $SRC/ngx_pagespeed-release-${NPS_VERSION}-beta/
wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz
tar -xzvf ${NPS_VERSION}.tar.gz # extracts to psol/
cd $SRC
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar -xvzf nginx-${NGINX_VERSION}.tar.gz
cd $SRC/nginx-${NGINX_VERSION}
./configure --prefix=/var/www \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-file-aio \
--with-http_ssl_module \
--with-http_spdy_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-ipv6 \
--with-mail \
--with-mail_ssl_module \
--add-module=$SRC/ngx_pagespeed-release-${NPS_VERSION}-beta
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment