您的位置: 首页 > 文章 > nginx负载均衡 nginx负载均衡 分类: 文章 • 2024-03-06 12:37:14 进入nginx目录: 进入:conf配置文件目录: 通过配置nginx.conf文件来实现负载均衡: 如果想让哪台服务器配置得多一些,可以用weight属性。 已上面为例: 默认是1,就是说server localhost:8081;的weight属性=1. server localhost:8082 weight=2;的话,那么nginx分配给localhost:8082的数量就会比localhost:8081要多了。