1、nginx配置
server {
listen 80;
server_name aaaa.com;
location / {
proxy_pass http://cdn.aaa.com;
try_files $uri $uri/ @router;
}
location @router {
rewrite ^.*$ /index.html last;
}
location /api/ {
proxy_pass http://localhost:8899;
}
}
2、解决刷新404的问题
try_files $uri $uri/ @router;