【问题标题】:nginx error -client closed connection while waiting for request, client: x.x.x.x, server: 0.0.0.0:80nginx 错误 - 客户端在等待请求时关闭连接,客户端:x.x.x.x,服务器:0.0.0.0:80
【发布时间】:2019-09-13 23:03:49
【问题描述】:
server {
    listen  80;
    server_name xx.cn;
    index index.php index.html index.htm;
    root  /data/www_deploy/xx/backend/web;

    location ~* /\. {
         deny all;
    }    

    location  / {
        try_files $uri /index.php?$args;
    }
    location ~ .*\.(php|php5)?$
    {
         fastcgi_pass    127.0.0.1:9000;
         fastcgi_index   index.php;
         fastcgi_split_path_info ^(.+\.php)(/.+)$;
         fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
         include         fastcgi_params;
    }
    client_max_body_size 512m;
}

nginx 错误显示客户端在等待请求时关闭连接,客户端:x.x.x.x,服务器:0.0.0.0:80 通过客户端浏览器访问域时

错误显示

正在连接到 xx.cn (xx.cn)|x.x.x.x|:80... 已连接。 HTTP 请求已发送,等待响应... 500 内部服务器错误 2019-09-13 19:48:18 错误 500:内部服务器错误。

通过 wget xx.cn 在服务器上

不知道怎么处理?

【问题讨论】:

  • 如果您调用的 index.php(或任何其他脚本)没有正确退出,例如抛出异常,通常会发生这种情况。查看error.log。
  • 谢谢你是对的。我已经解决了。我已经检查过了。缺少包含在 index.php 中的目录

标签: php nginx


【解决方案1】:

如果您调用的 index.php(或任何其他脚本)没有正确退出,例如抛出异常,这通常会发生。

查看error.log

【讨论】:

    猜你喜欢
    • 2018-07-21
    • 1970-01-01
    • 1970-01-01
    • 2016-07-06
    • 1970-01-01
    • 2010-12-19
    • 2019-03-17
    • 1970-01-01
    • 2021-04-07
    相关资源
    最近更新 更多