vue项目本地运行正常,上到服务器后。刷新页面报404错误问题
2019-10-28 本文已影响0人
小太阳可可
主要问题所在,nginx的配置缺失问题;
vi nginx.conf
输入命令 i 进入编辑模式,在指定位置添加代码
location / {
root ...
index ...
try_files $uri $uri/ /index.html; ---解决页面刷新404问题
}
详情:https://blog.csdn.net/qq_27985607/article/details/86608392
https://www.cnblogs.com/goloving/p/9170508.html