首页 > 其他 > 详细

Nginx配置 - Vue项目(history)页面刷新404解决方案

时间:2020-03-30 17:06:02      阅读:188      评论:0      收藏:0      [点我收藏+]

添加如下配置:

try_files $uri $uri/ /index.html;

server {
    listen       80 ;
    server_name  ***.abc.com;
    location / {
        root   /opt/ttjr;
        index index.html;
        try_files $uri $uri/ /index.html;
    }
}

Nginx配置 - Vue项目(history)页面刷新404解决方案

原文:https://www.cnblogs.com/Mr-Lim/p/12599413.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!