前端包所在部署服务器(10.0.0.1:8088)
后端包所在部署服务器(10.0.0.2:8089)
upstream luyou {
server 10.0.0.2:8089 weight=1;#后端程序所在服务器ip以及端口
}
server {
listen 81;
server_name localhost;
location /screen/ { #screen为前端路由,浏览器访问需要加上,前端配置文件路由需要加上.ip+/screen/
alias /data/qianduan/screen01/;#前端index.html对应的目录地址
}
location /apm {
proxy_pass http://luyou/apm; #apm为后端接口的统一前缀,如果不统一,需要配置多个location
expires -1s;
}
}