linux:CentOS 7.9 64位
nginx:1.22
php:8.0.25
堡塔的站点伪静态配置如下:- location / {
- if (!-e $request_filename){
- rewrite ^/(.*) /index.php last;
- }
- }
复制代码 php框架使用的Yii2,API的返回结果如下:
- localhost{"type":"error","message":"\u6821\u9a8c\u56fe\u7247\u9a8c\u8bc1\u7801\u65f6\u51fa\u73b0\u9519\u8bef","result":"","code":10000}
复制代码
程序在我本地和另外一台阿里云服务器(镜像市场里微柳公司的镜像)上都正常,返回的数据没有localhost,并且是json格式。
尝试过使用Apache,地址重写后同样会自动添加localhost这个字符串。
有没有大神遇到过这个问题啊?
|
|