当前位置:   article > 正文

解决Nginx部署vue项目,登录后刷新页面404问题_phpstudy nginx vue 登录后404

phpstudy nginx vue 登录后404
  1. server {
  2. listen 9191;
  3. server_name xxx;
  4. location / {
  5. root arcroomsys;
  6. index index.html;
  7. try_files $uri $uri/ /index.html;
  8. }
  9. }

root   arcroomsys;       #nginx项目路径,此处为相对路径
index  index.html;     #vue的index.html文件
try_files $uri $uri/ /index.html;  #将后续路由,重定向到index.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/496228
推荐阅读
相关标签
  

闽ICP备14008679号