如何在windows下配置nginx,实现udp的负载均衡

2019-07-04 09:50发布

问题:

如何在windows下配置nginx,实现udp的负载均衡, 我配置的一直都不成功

user nobody;

worker_processes 1;

error_log logs/error.log;

error_log logs/error.log notice;

error_log logs/error.log info;

pid logs/nginx.pid;

events {
worker_connections 1024;
}

Load balanceUDP-based DNS traffic across two servers

stream {

upstream dns {
   server 10.10.20.38:20086;
}

server {
    listen 20085 udp ;
    proxy_responses 1;
    proxy_pass dns;
}

}

回答1:

windows 防火墙有没有允许20086端口?



回答2:

windows的nginx 版本是不支持udp的