码上敲享录 > nginx > nginx vue页面再次刷新404

nginx vue页面再次刷新404

上一章章节目录 2023-01-08已有507人阅读 评论(0)

nginx vue页面再次刷新404


解决方法:

调整nginx的配置下:

//vue项目打包后存放的文件路径

          root   /opt/web;        

       location / {

            try_files $uri $uri/ @router;

            index  index.html;

        }

       location @router{

           rewrite ^.*$ /index.html last;

        }

        #代理后台接口

        location /api/ {

           proxy_pass http://portalServer/;

           proxy_set_header Host $host:$server_port;

       }


向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交