git clone git@github.com:yaoweibin/nginx_tcp_proxy_module.git
patch –p1 < /第四步的目录/tcp.patch
./configure --add-module=/第四步的目录/
make
make install
tcp { upstream cluster { # simple round-robin server localhost:8890; server localhost:8891; check interval=3000 rise=2 fall=5 timeout=1000; #check interval=3000 rise=2 fall=5 timeout=1000 type=ssl_hello; #check interval=3000 rise=2 fall=5 timeout=1000 type=http; #check_http_send "GET / HTTP/1.0\r\n\r\n"; #check_http_expect_alive http_2xx http_3xx; } server { listen 8888; proxy_pass cluster; } }
/nginx目录/sbin/nginx
原文:http://blog.csdn.net/newjueqi/article/details/19114449