1.场景描述
前端部署到nginx之后,刷新同一个页面,出现404,不刷新,没问题。
2.解决方案
在nginx.conf配置中加上下面的配置
location / {
root html/dist;
#解决页面刷新404的问题
try_files $uri $uri/ /index.html;
}
2024-04-17 08:21:15 阅读次数:47
前端部署到nginx之后,刷新同一个页面,出现404,不刷新,没问题。
在nginx.conf配置中加上下面的配置
location / {
root html/dist;
#解决页面刷新404的问题
try_files $uri $uri/ /index.html;
}
Vue项目学习(1)
vue-image-crop-upload 一个强大的图片剪切组件
vue-area-linkage 省市区Vue组件
webpack2.4.* 常用的一些loader
vue v-show && v-model的简单使用
使用 Vue 和 Create-Vue 构建工程化前端项目
vue-property-decorator 用法详解
nginx:400 Bad RequestThe plain HTTP request
nginx前端负载均衡主配置文件
非openresty方式安装Nginx + Lua + Redis 环境
文章
32268
阅读量
4671623
2025-04-01 10:29:12
2025-03-31 08:57:48
2025-03-31 08:57:48
2025-03-31 08:57:38
2025-03-31 08:50:08
2025-03-18 08:27:10
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