解决办法:
在nginx的配置文件中添加
location / {
root /usr/share/nginx/html/;
index index.html index.htm;
try_files $uri $uri/ @router;
index index.html;
}
location @router {
rewrite ^.*$ /index.html last;
}
主要是try_files这个