前端是vue 接口使用yii2 报 401 Unauthorized
1、访问http://****/#/login报{"name":"Unauthorized","message":"Your request was made with invalid credentials.","code":0,"status":401,"type":"yii\\web\\UnauthorizedHttpException"}

2、看了一下项目目录 访问地址有改成 http://www.back.com/index.html#/login
又在nginx添加伪静态:
location ~ ^/.*$ {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php last;
}
}
访问就可以了



阅读量:57
阅读量:77
阅读量:105
阅读量:83
阅读量:120