Today found logs mass 400 error
The http1.1 standard specifies that the request must contain header information, and if the request header is empty then Web server returns 400 in detail and can see RFC 2316, section 14.23
In addition to the above-mentioned Telnet method may cause the empty request header, when the browser downloads the picture while clicking other links, will close the download connection, will also appear the empty request header, or the robot constructs the empty request header to access.
Remove the 400 method from the access log
0.7.12 Previous version of Nginx received an empty request, Nginx will not go to match any virtual host, directly return 400 error,
After the new version of Nginx can be used server_name _, matching the empty request header.
So if you use an older version, upgrade to 0.7.12 later versions
Add the following default virtual host server after upgrade.
Add the default server-to-configuration file, the following configuration is interpreted to prohibit the access of an unbound domain name here
server { listen default_server; server_name _; return 404; Access_log off;}
It is recommended that the above server be saved as default.conf and then include to the master profile nginx.conf.
The above describes the Nginx bad request errors, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.