3
votes
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 error show that client closed connection while waiting for request, client: x.x.x.x, server: 0.0.0.0:80 when visit domain via client browser

error show that

Connecting to xx.cn (xx.cn)|x.x.x.x|:80... connected. HTTP request sent, awaiting response... 500 Internal Server Error 2019-09-13 19:48:18 ERROR 500: Internal Server Error.

on the server via wget xx.cn

I wonder how to deal it?

1
This often happens if the index.php (or any other script) you are calling does not exit correctly, for example throwing an exception. Have a look at the error.log.Markus Zeller
thanks you are right. I have solved it .I have checked it . Missing a directiory including in the index.phpneedrunning

1 Answers

1
votes

This often happens if the index.php (or any other script) you are calling does not exit correctly, for example throwing an exception.

Have a look at the error.log