- 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