小编Per*_*alt的帖子

NGINX 未知指令流

我正在尝试使用 NGINX (1.12.1) 设置 UDP 负载均衡器。

但是我收到错误...

[ec2-user@ip-172-31-0-184 nginx]$ sudo service nginx start 启动 nginx: nginx: [emerg] /etc/nginx/conf.d/load-balancer.conf 中的未知指令“stream”: 1

这是我尝试使用的配置:

stream {
        upstream backend1 {
                server 10.0.1.50:450;
        }

upstream backend2 {
                server 10.0.1.50:500;
        }

# This server accepts all traffic to port 80 and passes it to the upstream.
        # Notice that the upstream name and the proxy_pass need to match.

        server {
                listen 500 udp;
                proxy_pass backend2;
        }

server {
                listen 4500 udp;
                proxy_pass backend1;
        }

}
Run Code Online (Sandbox Code Playgroud)

这是 …

udp load-balancing nginx

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

load-balancing ×1

nginx ×1

udp ×1