前端三种路由配置
第一种
1
2
3
4
5location /anti-fraud {
alias /opt/welab/anti-fraud;
index index.html index.htm;
error_page 404 /anti-fraud/index.html;
}第二种
1
2
3
4
5location /financial-life {
rewrite /financial-life/(.+) /$1 break;
root /opt/welab/financial-life;
index index.html index.htm;
}第三种
1
2
3
4
5location /sjd {
alias /opt/welab/sjd;
index index.html index.htm;
try_files $uri /sjd/login /sjd/main.html;
}
跨域配置
1 | add_header Access-Control-Allow-Origin *; |