1.场景描述
前端部署到nginx之后,刷新同一个页面,出现404,不刷新,没问题。
2.解决方案
在nginx.conf配置中加上下面的配置
location / {
root html/dist;
#解决页面刷新404的问题
try_files $uri $uri/ /index.html;
}
2024-04-17 08:21:15 阅读次数:46
前端部署到nginx之后,刷新同一个页面,出现404,不刷新,没问题。
在nginx.conf配置中加上下面的配置
location / {
root html/dist;
#解决页面刷新404的问题
try_files $uri $uri/ /index.html;
}
vue-property-decorator 用法详解
nginx:400 Bad RequestThe plain HTTP request
nginx前端负载均衡主配置文件
非openresty方式安装Nginx + Lua + Redis 环境
【nginx】starrocks通过nginx实现负载均衡、故障转移与flink运行SR实战
解决vue3引入ref后页面报错:The requested module ‘/xx/vue.js‘ does not provide an export named ‘default‘
vue中使用iframe嵌套html页面并传值到html
Vue 生产环境打开vue-devtools工具
vue-入门介绍
Nginx配置文件说明
文章
31359
阅读量
4484625
2025-03-18 08:27:10
2025-03-06 09:17:42
2025-03-06 09:15:52
2025-03-04 09:31:43
2025-02-26 07:22:11
2025-02-26 07:20:49
2023-04-24 11:26:51
2023-02-07 10:34:04
2023-07-26 08:08:42
2022-11-16 11:58:05
2023-05-04 08:59:25
2023-04-17 09:39:44