upstream consul { server 127.0.0.1:8501; server 127.0.0.1:8502; server 127.0.0.1:8503; } server { listen 80; server_name consul.test.com;#服务域名,需要填写你的服务域名 location / { proxy_pass http://consul;#请求转向consul服务器列表 proxy_set_header Host $host; proxy_set_he…