栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

centos8 nginx1.16启用stream功能tcp转发

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

centos8 nginx1.16启用stream功能tcp转发

默认dnf安装是不能使用steam功能的,会提示stream 模块无法识别。

dnf install nginx-mod-stream

steam 配置实例:
nginx.conf 顶层和http模块同级

##add by chunk
stream {

    server {
        listen     18088;
        #TCP traffic will be forwarded to the "stream_backend" upstream group
        proxy_pass 172.19.201.xxx:18088;
    }
    }

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   600;
    types_hash_max_size 2048;
    client_max_body_size 100M;
    fastcgi_connect_timeout 600;
    fastcgi_send_timeout 600;
    fastcgi_read_timeout 600;
    send_timeout 600; 
}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/361497.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号