nginx tcp端口模块

1.[不推荐,实测安装存在错误]

nginx不自带tcp转发模块,可以进行下载编译安装
tcp转发模块源码 https://github.com/yaoweibin/nginx_tcp_proxy_module

安装参考:Centos7 搭建Nginx+rtmp+hls直播推流服务器 - 冬音 - 博客园 (cnblogs.com)

 

2.[推荐]

高版本的nginx有自带tcp负载均衡配置(stream模块)

编译时,通过添加 --with-stream 参数来安装 stream 模块。

注意:This is now possible with the addition of the ngx_stream_ssl_preread module added in Nginx 1.11.5 and the ngx_stream_map module added in 1.11.2.

 


nginx_tcp_proxy_module/README.md at master · yaoweibin/nginx_tcp_proxy_module (github.com)

支持nginx_tcp_proxy_module的nginx安装(1.9.9版本)_ting0fdnb的博客-CSDN博客_nginx_tcp_proxy_module

nginx 通过域名代理tcp端口_第一天-CSDN博客_nginx根据域名转发tcp

Nginx TCP forwarding based on hostname - Stack Overflow

posted @ 2022-03-09 19:54  冬音  阅读(248)  评论(0编辑  收藏  举报