Created
August 5, 2012 20:21
-
-
Save loopj/3266998 to your computer and use it in GitHub Desktop.
Install passenger and nginx with SPDY 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.4 | |
| 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/spdy/patch.spdy.txt | |
| patch -p0 < patch.spdy.txt | |
| # Install passenger gem | |
| sudo gem install passenger | |
| # Configure passenger | |
| sudo passenger-install-nginx-module \ | |
| --auto \ | |
| --nginx-source-dir=$TMP_PATH/nginx-$NGINX_VERSION \ | |
| --prefix=/usr \ | |
| --extra-configure-flags="--conf-path=/etc/nginx/nginx.conf" | |
| # Build and install nginx | |
| make && 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