There are a large number of 400 errors in the Access.log, and an increase of hundreds of M per day, taking up a lot of space.
Copy Code code as follows:
Tail-f/opt/nginx/logs/access.log
116.236.228.180--[15/dec/2010:11:00:15 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:15 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:15 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:15 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:15 +0800] "-" 400 0 "-" "-"
119.97.196.7--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
119.97.196.7--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
219.243.95.197--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
116.236.228.180--[15/dec/2010:11:00:16 +0800] "-" 400 0 "-" "-"
A lot of articles on the Internet that is the HTTP head/cookie caused by too much, you can modify the nginx.conf two parameters to amend.
Copy Code code as follows:
Client_header_buffer_size 16k;
Large_client_header_buffers 4 32k;
After modification
Copy Code code as follows:
Client_header_buffer_size 64k;
Large_client_header_buffers 4 64k;
No effect, even if I nginx0.7.62 up to the latest 0.8.54 also failed to solve.
In the official forum Nginx authors mention that the null host header does not return a custom status code and is a 400 error.
http://forum.nginx.org/read.php?2,9695,11560
The final amendment is as follows
Change to original value
Copy Code code as follows:
Client_header_buffer_size 16k;
Large_client_header_buffers 4 32k;
Close the default host's logging to resolve the problem
Copy Code code as follows:
server {
Listen *:80 default;
server_name _;
return 444;
Access_log off;
}