Skip to content

Instantly share code, notes, and snippets.

@pontusab
Created February 5, 2014 11:10
Show Gist options
  • Save pontusab/8821349 to your computer and use it in GitHub Desktop.
Save pontusab/8821349 to your computer and use it in GitHub Desktop.
Install Nginx 1.5.9 SPDY draft 3.1
#!/bin/sh
NGINX_VERSION=1.5.9
TMP_PATH=/tmp
# Fetch and extract nginx source
cd $TMP_PATH
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz
tar xvfz nginx-$NGINX_VERSION.tar.gz
cd nginx-$NGINX_VERSION
# Fetch the SPDY patch and apply it
wget http://nginx.org/patches/patch.spdy-v31.txt
patch -p1 < patch.spdy-v31.txt
# Configure nginx
./configure \
--prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--lock-path=/var/lock/nginx.lock
--pid-path=/var/run/nginx.pid
--with-pcre-jit
--with-debug
--with-http_addition_module
--with-http_auth_request_module
--with-http_dav_module
--with-http_geoip_module
--with-http_gzip_static_module
--with-http_image_filter_module
--with-http_realip_module
--with-http_stub_status_module
--with-http_ssl_module
--with-http_sub_module
--with-http_xslt_module
--with-http_spdy_module
--with-ipv6
--with-mail
--with-mail_ssl_module
--with-openssl=/build/buildd/nginx-1.5.9/debian/openssl-1.0.1f
--add-module=/build/buildd/nginx-1.5.9/debian/modules/nginx-auth-pam
--add-module=/build/buildd/nginx-1.5.9/debian/modules/nginx-echo
--add-module=/build/buildd/nginx-1.5.9/debian/modules/nginx-upstream-fair
--add-module=/build/buildd/nginx-1.5.9/debian/modules/nginx-dav-ext-module
--add-module=/build/buildd/nginx-1.5.9/debian/modules/nginx-cache-purge
# Build and install nginx
make && sudo make install
# Cleanup
cd $TMP_PATH
rm -r nginx-$NGINX_VERSION
rm nginx-$NGINX_VERSION.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment