vue项目发布后,线上运行时刷新404

修改nginx配置文件

location / {
root ...
index ...
try_files $uri $uri/ /index.html; ---解决页面刷新404问题
}

(参考官网 https://router.vuejs.org/zh-cn/essentials/history-mode.html

posted on 2021-11-10 16:24  leaverk  阅读(95)  评论(0)    收藏  举报