1.部署三台前端服务器
upstream webservers {
server first.cecport.com:8081;
server first.cecport.com:8082;
server first.cecport.com:8083;
}
2.通过8004端口做前端负载均衡轮询
listen 8084;
location / {
proxy_pass http://webservers;
}
3.
server {
listen 8081/8082/8083;
server_name first.cecport.com;
location / {
root F:/webserver/joa1;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
4.现象是,单独first.cecport.com:8081访问没有问题,正常显示,如果通过first.cecport.com:8084负载过去,页面不显示,js加载不了,报错。

哪里有问题?