我在Windows上使用1.18版本。 我试图将NGINX配置为负载平衡器。我看了看文档,但仍然没用。 (https://www.nginx.com/resources/wiki/start/topics/examples/loadbalanceexample/)
这是我要由负载均衡器转发的本地URL
http://localhost:57879/swagger/index.html
这是我的配置
events { }
http {
upstream myproject {
server localhost:57879 weight=3;
}
server {
listen 80;
server_name _;
location /swagger {
proxy_pass http://myproject;
}
}
}