nginx负载均衡配置

Posted chenjianwen

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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负载均衡配置的主要内容,如果未能解决你的问题,请参考以下文章