Last active
December 11, 2015 03:39
-
-
Save dana-ross/4539569 to your computer and use it in GitHub Desktop.
Compile nginx with SPDY patch and Passenger support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NGINX_VERSION=1.3.11 | |
TMP_PATH=/tmp | |
# Fetch and extract Nginx | |
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 and apply the Nginx SPDY patch | |
#wget http://nginx.org/patches/spdy/patch.spdy.txt | |
#patch -p0 < patch.spdy.txt | |
wget http://nginx.org/patches/spdy/patch.spdy-55_1.3.11.txt | |
patch -p1 < patch.spdy-55_1.3.11.txt | |
# Install the latest passenger gem | |
sudo gem install passenger | |
# Configure passenger (with ubuntu-style paths) | |
sudo /var/lib/gems/1.9.1/gems/passenger-3.0.19/bin/passenger-install-nginx-module \ | |
--auto \ | |
--nginx-source-dir=$TMP_PATH/nginx-$NGINX_VERSION \ | |
--prefix=/usr \ | |
--extra-configure-flags=" \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--pid-path=/var/run/nginx.pid \ | |
--sbin-path=/usr/sbin \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--with-http_ssl_module \ | |
--with-http_spdy_module \ | |
--with-http_gzip_static_module \ | |
--with-ipv6" | |
# Cleanup | |
sudo rm -r $TMP_PATH/nginx-$NGINX_VERSION | |
rm $TMP_PATH/nginx-$NGINX_VERSION.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment