Created
October 31, 2011 19:41
-
-
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
This file contains 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
# 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