Nginx部署Vue项目以及解决刷新页面404问题

在宝塔面板站点中增加相应配置:

 

 

location / {
             try_files $uri $uri/ @router;
             index index.html;
         }
        location @router {
            rewrite ^.*$ /index.html last;
        }

 

posted @ 2021-06-21 16:52  无聊的蚂蚁  阅读(1671)  评论(2编辑  收藏  举报