nginx & tengine实现四层代理

您所在的位置:网站首页 nginxtengine nginx & tengine实现四层代理

nginx & tengine实现四层代理

2024-05-26 19:25| 来源: 网络整理| 查看: 265

Nginx默认是通过stream进行代理的,配置模板如下:

server { listen 8014; proxy_pass cnes2101; proxy_timeout 60s;}

upstream cnes2101{ server 10.0.10.1:2101;}

tengine是通过nginx_tcp_proxy_module三方模块实现的:

参考链接:https://github.com/yaoweibin/nginx_tcp_proxy_module/

tcp { upstream cluster { # simple round-robin server 192.168.0.1:80; server 192.168.0.2:80;

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; } }

 

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3