美文网首页
NGINX stream组件模块安装及使用

NGINX stream组件模块安装及使用

作者: for笑 | 来源:发表于2023-09-07 14:51 被阅读0次

yum install -y nginx

yum install -y nginx-mod-stream

## /etc/nginx/nginx.conf

stream {

    server {

        listen 80;

    proxy_pass xxx.xxx.xxx.xxx:80;

  }

    server {

        listen 8080;

    proxy_pass xxx.xxx.xxx.xxx:8080;

  }

}

nginx -s stop 停止服务

nginx -t 测试默认配置文件格式

nginx -c /etc/nginx/nginx.conf 启动加载指定配置文件

nginx -s reload 默认加载配置

相关文章

网友评论

      本文标题:NGINX stream组件模块安装及使用

      本文链接:https://www.haomeiwen.com/subject/eotrvdtx.html