宝塔搭建
主要一下两句话配置完成
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/97ee8ed9f9f0bdfafd96269703706b0f.png)
location / {
root /usr/src/app;
#root地址需要改 与nginx一致
index index.html index.htm;
try_files $uri $uri/ @rewrites;
}
# 配置如果匹配不到资源,将url指向 index.html, 在 vue-router 的 history 模式下使用,就不会显示404
location @rewrites {
rewrite ^(.*)$ /index.html last;
}