JavaScript

Vue项目部署二级目录, 解决前端history路由模式刷新40

2022-09-28  本文已影响0人  剑指流云

二级目录部署,配置伪静态 解决前端history路由模式刷新404问题

location /datav {
    alias /www/wwwroot/test.xjaft.com/datav;
    try_files $uri $uri/ /datav/index.html;
}

nginx代理跨域,跨服务器

location /api{ # 接口前缀
  proxy_pass https://ahmg.yooticloud.cn; # 目标服务器
  proxy_redirect off; # 重定向关
  proxy_cookie_path / /api; # 目标服务器接口后缀
}
上一篇 下一篇

猜你喜欢

热点阅读