Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save megamvb/1094044 to your computer and use it in GitHub Desktop.
Save megamvb/1094044 to your computer and use it in GitHub Desktop.

Revisions

  1. @geoffgarside geoffgarside created this gist Mar 4, 2011.
    30 changes: 30 additions & 0 deletions install-passenger-nginx.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    #!/bin/sh
    #
    # Pre-requisites:
    # FreeBSD
    # Passenger installed as a gem
    # Optional:
    # Ruby Enterprise Edition instead of lang/ruby18
    #

    make -C /usr/ports/www/nginx clean patch apply-slist install-rc-script
    source_dir=`ls -d /usr/ports/www/nginx/work/nginx-*` # should be only one

    passenger-install-nginx-module --prefix=/usr/local \
    --nginx-source-dir="${source_dir}" \
    --extra-configure-flags="--with-cc-opt=\"-I /usr/local/include\" \
    --with-ld-opt=\"-L /usr/local/lib\" \
    --conf-path=/usr/local/etc/nginx/nginx.conf \
    --sbin-path=/usr/local/sbin/nginx \
    --pid-path=/var/run/nginx.pid \
    --error-log-path=/var/log/nginx-error.log \
    --user=www --group=www \
    --http-client-body-temp-path=/var/tmp/nginx/client_body_temp \
    --http-proxy-temp-path=/var/tmp/nginx/proxy_temp \
    --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp \
    --http-log-path=/var/log/nginx-access.log \
    --with-http_addition_module \
    --with-http_gzip_static_module \
    --with-http_ssl_module \
    --with-http_stub_status_module" \
    --with-ipv6