网站首页 返回列表 像“草根”一样,紧贴着地面,低调的存在,冬去春来,枯荣无恙。 nginx配置tcp,udp端口转发 24-11-1 09:56:24 曹大卫 84 ```shell ##1、编译时使用stream模块 ./configure --with-stream 示例 ./configure --user=www --group=www --prefix=/home/nginx --with-http_stub_status_module --with-http_ssl_module --with-stream_ssl_module --with-http_gzip_static_module --with-http_sub_module --with-http_v2_module --with-pcre --with-threads --with-stream --with-zlib=/root/zlib-1.2.13 --with-openssl=/root/openssl-1.1.1t stream { ###tcp #将tcp12345端口转发到192.168.1.23的3306端口 server { listen 12345; proxy_connect_timeout 5s; proxy_timeout 20s; proxy_pass 192.168.1.23:3306; } ###udp #将udp 53端口转发到192.168.1.23 53端口 server { listen 53 udp reuseport; proxy_timeout 20s; proxy_pass 192.168.1.23:53; } #ipv4转发到ipv6 server { listen 9135; proxy_connect_timeout 10s; proxy_timeout 30s; proxy_pass [2607:fcd0:107:3cc::1]:9135; } } ``` 关键字词[nginx] 分享到: 上一篇:nginx配置后端健康检查 下一篇:centos7安装nfs及挂载 如需留言,请 登录,没有账号?请 注册 0 条评论 0 人参与 最新文章 centos7 rsyslog v8.24.0-34.el7 版本bug efk中将宿主机ip地址采集到日志输出中 企业微信群机器人@成员的方式 promethues operator修改告警规则 centos7配置阿里云yum源 pt-duplicate-key-checker 工具检测mysql是否有重复索引 阿里云ecs扩容磁盘 es启用 tcp和http的ssl后报错 点击排行 alertmanager按标签分发告警到接收者 企业微信群机器人@成员的方式 calico三种网络模式 promethues operator修改告警规则 centos7配置阿里云yum源 最新评论 友情链接
0 条评论 0 人参与