Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

前端打包部署后刷新报404 #69

Closed
codetiger666 opened this issue Apr 16, 2022 · 1 comment
Closed

前端打包部署后刷新报404 #69

codetiger666 opened this issue Apr 16, 2022 · 1 comment

Comments

@codetiger666
Copy link

前端页面打包后部署到nginx,直接打开主页正常,点击各页面也正常,但是刷新就报404错误,直接打开除主页外的任何页面都报404错误

@Naccl
Copy link
Owner

Naccl commented Apr 16, 2022

我在 VueRouter 中使用的是 HTML5 History 模式,在服务器部署后,需要额外的配置支持。

参考官方文档 https://v3.router.vuejs.org/zh/guide/essentials/history-mode.html

另外,如需 Express + Node.js 的配置方法,可以参考 #63

@Naccl Naccl closed this as completed Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants