Skip to content

Instantly share code, notes, and snippets.

@loopj
Created August 5, 2012 20:21
Show Gist options
  • Save loopj/3266998 to your computer and use it in GitHub Desktop.
Save loopj/3266998 to your computer and use it in GitHub Desktop.

Revisions

  1. loopj revised this gist Nov 12, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion passenger-nginx-spdy.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/sh

    NGINX_VERSION=1.3.7
    NGINX_VERSION=1.3.8
    TMP_PATH=/tmp

    # Fetch and extract Nginx
  2. loopj revised this gist Oct 21, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion passenger-nginx-spdy.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/sh

    NGINX_VERSION=1.3.4
    NGINX_VERSION=1.3.7
    TMP_PATH=/tmp

    # Fetch and extract Nginx
  3. loopj revised this gist Aug 5, 2012. 1 changed file with 6 additions and 8 deletions.
    14 changes: 6 additions & 8 deletions passenger-nginx-spdy.sh
    Original file line number Diff line number Diff line change
    @@ -3,20 +3,20 @@
    NGINX_VERSION=1.3.4
    TMP_PATH=/tmp

    # Fetch and extract nginx source
    # 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 the SPDY patch and apply it
    # Fetch and apply the Nginx SPDY patch
    wget http://nginx.org/patches/spdy/patch.spdy.txt
    patch -p0 < patch.spdy.txt

    # Install passenger gem
    # Install the latest passenger gem
    sudo gem install passenger

    # Configure passenger
    # Configure passenger (with ubuntu-style paths)
    sudo passenger-install-nginx-module \
    --auto \
    --nginx-source-dir=$TMP_PATH/nginx-$NGINX_VERSION \
    @@ -28,8 +28,6 @@ sudo passenger-install-nginx-module \
    --error-log-path=/var/log/nginx/error.log \
    --http-log-path=/var/log/nginx/access.log"


    # Cleanup
    cd $TMP_PATH
    sudo rm -r nginx-$NGINX_VERSION
    rm nginx-$NGINX_VERSION.tar.gz
    sudo rm -r $TMP_PATH/nginx-$NGINX_VERSION
    rm $TMP_PATH/nginx-$NGINX_VERSION.tar.gz
  4. loopj revised this gist Aug 5, 2012. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions passenger-nginx-spdy.sh
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ patch -p0 < patch.spdy.txt
    # Install passenger gem
    sudo gem install passenger

    # Configure passenger (with ubuntu-style paths)
    # Configure passenger
    sudo passenger-install-nginx-module \
    --auto \
    --nginx-source-dir=$TMP_PATH/nginx-$NGINX_VERSION \
    @@ -28,10 +28,8 @@ sudo passenger-install-nginx-module \
    --error-log-path=/var/log/nginx/error.log \
    --http-log-path=/var/log/nginx/access.log"

    # Build and install nginx
    make && make install

    # Cleanup
    cd $TMP_PATH
    rm -r nginx-$NGINX_VERSION
    sudo rm -r nginx-$NGINX_VERSION
    rm nginx-$NGINX_VERSION.tar.gz
  5. loopj revised this gist Aug 5, 2012. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions passenger-nginx-spdy.sh
    Original file line number Diff line number Diff line change
    @@ -16,17 +16,22 @@ patch -p0 < patch.spdy.txt
    # Install passenger gem
    sudo gem install passenger

    # Configure passenger
    # Configure passenger (with ubuntu-style paths)
    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"
    --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"

    # Build and install nginx
    make && make install

    # Cleanup
    cd $TMP_PATH
    rm -r nginx-$NGINX_VERSION
    rm nginx-$NGINX_VERSION.tar.gz
    rm nginx-$NGINX_VERSION.tar.gz
  6. loopj created this gist Aug 5, 2012.
    32 changes: 32 additions & 0 deletions passenger-nginx-spdy.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #!/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