【16】Nginx实现负载均衡

  • 1.安装Nginx

地址:http://nginx.org/en/download.html

下载最新Nginx后解压

  • 2.iis中添加n个负载均衡服务(本例为2个)

分别为http://localhost:8080/test、http://localhost:8082/test 并添加test.html页面到两个服务器文件的根目录

  • 3.配置nginx配置文件 ~\nginx-1.15.5\conf\nginx.conf

访问http://localhost:8081/test/test.html会将请求负载到http://localhost:8080/test/test.html、http://localhost:8082/test/test.html

猜你喜欢

转载自blog.csdn.net/chen_peng7/article/details/83753074