4
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?

2
  • 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. Sep 13, 2019 at 23:06
  • thanks you are right. I have solved it .I have checked it . Missing a directiory including in the index.php Sep 14, 2019 at 1:36

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.