首页 > 代码库 > nginx负载均衡配置

nginx负载均衡配置

http {

  upstream docker {
      server 192.168.88.106:10001;
      server 192.168.88.106:10002;
      server 192.168.88.106:10003;
       }

  server {
    listen 81;
    server_name localhost;

  location / {
    proxy_pass http://docker;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }
   }

}

nginx负载均衡配置