nginx 非socket代理配置
生活随笔
收集整理的這篇文章主要介紹了
nginx 非socket代理配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
nginx反向代理socket配置
1,安裝
git clone https://github.com/yaoweibin/nginx_tcp_proxy_module cd nginx-1.8.1patch -p1 < /root/to/nginx_tcp_proxy_module/tcp.patch./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_perl_module --add-module=/root/nginx_tcp_proxy_modulemake && make install2,配置
TCP是獨立模塊,不可在http模塊中
events {worker_connections 1024; }tcp {upstream cluster{server x.x.x.x:x;check interval=3000 rise=2 fall=5 timeout=1000; }server {listen 8181;proxy_pass cluster;} }http {include mime.types;default_type application/octet-stream;重啟nginx即可
END!
轉載于:https://www.cnblogs.com/changbo/p/5641342.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的nginx 非socket代理配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 梦到打死壁虎是什么意思呢
- 下一篇: codevs 1028 花店橱窗布置 (