Skip to content

Instantly share code, notes, and snippets.

@felixhummel
Created October 31, 2011 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixhummel/1328636 to your computer and use it in GitHub Desktop.
Save felixhummel/1328636 to your computer and use it in GitHub Desktop.
Build Nginx 1.0.8 on Ubuntu 10.10 with reverse web socket capabilities
# http://www.letseehere.com/reverse-proxy-web-sockets
export VERSION=1.0.8
export PREFIX=/usr/local
export USERNAME=nginx
export GECOS='nginx web server'
filename=nginx-$VERSION.tar.gz
set -x # print commands
set -e # stop on any error encountered
sudo apt-get -y install libpcre3-dev libgeoip-dev geoip-database
#create user
id $USERNAME &> /dev/null || sudo adduser --disabled-login --gecos "$GECOS" $USERNAME
# get stuff
cd /tmp
[[ -f $filename ]] || curl -O http://nginx.org/download/$filename
[[ -d nginx_tcp_proxy_module ]] || git clone https://github.com/yaoweibin/nginx_tcp_proxy_module.git
tar -xzf nginx-$VERSION.tar.gz
cd nginx-$VERSION
patch -p1 < ../nginx_tcp_proxy_module/tcp.patch
./configure --prefix=$PREFIX --user=$USERNAME --group=$USERNAME --with-http_ssl_module --with-http_geoip_module --with-http_flv_module --add-module=../nginx_tcp_proxy_module/
make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment