Skip to content

Instantly share code, notes, and snippets.

@walm
Created December 1, 2011 10:10
Show Gist options
  • Save walm/1415541 to your computer and use it in GitHub Desktop.
Save walm/1415541 to your computer and use it in GitHub Desktop.
Install and update nginx with tcp_proxy on EC2 fedora amzn-ami
sudo yum install git nginx pcre-devel libxml2-devel libxslt-devel gd-devel geoip-devel
curl -O http://nginx.org/download/nginx-1.0.4.tar.gz
git clone git://github.com/yaoweibin/nginx_tcp_proxy_module
tar zxf nginx-1.0.4.tar.gz
cd nginx-1.0.4/
patch -p1 < ../nginx_tcp_proxy_module/tcp.patch
./configure --add-module=../nginx_tcp_proxy_module/ --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-mail --with-file-aio --with-mail_ssl_module --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
make
sudo make install
@walm
Copy link
Author

walm commented Dec 1, 2011

Just notice that nginx 1.1.4 ->
Has support for HTTP 1.1 proxy, so no need to use nginx_tcp_proxy_module.

ref https://github.com/LearnBoost/socket.io/wiki/Nginx-and-Socket.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment