美文网首页
nginx配置 接口状态200,但是PHP无返回数据,php服务

nginx配置 接口状态200,但是PHP无返回数据,php服务

作者: Yumazhiyao | 来源:发表于2022-07-08 10:00 被阅读0次

转:nginx配置之后接口状态200,但是无返回数据问题小记

nginx配置可能有问题。导致nginx不能解析PHP文件,检测nginx里对于php的配置信息。

 location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
#注释:这里的$document_root 是指server里配置的root ,也可以写成绝对目录比如: /wwwroot/YourProjectDoc$fastcgi_script_name。

相关文章

网友评论

      本文标题:nginx配置 接口状态200,但是PHP无返回数据,php服务

      本文链接:https://www.haomeiwen.com/subject/uxombrtx.html