nginx发布h5后空白

发布网友

我来回答

1个回答

热心网友

可能是因为前端vue项目迁移至K8S容器中。
现象:前端系统页面空白,只有标题栏。nginx容器默认配置:location/{;root/usr/share/nginx/html;try_files$uri/index、html。
解决方法:在容器中修改nginx配置location/{;root/usr/share/nginx/html;return200;#新增location/test{;alias/usr/share/nginx/html;try_files$uri/test/index、html。

热心网友

可能是因为前端vue项目迁移至K8S容器中。
现象:前端系统页面空白,只有标题栏。nginx容器默认配置:location/{;root/usr/share/nginx/html;try_files$uri/index、html。
解决方法:在容器中修改nginx配置location/{;root/usr/share/nginx/html;return200;#新增location/test{;alias/usr/share/nginx/html;try_files$uri/test/index、html。

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com