nginx日志报大量的400的错误:
58.216.165.116 – - [02/Nov/2012:10:50:42 +0800] “-” 400 0 “-” “-” -
58.216.165.185 – - [02/Nov/2012:10:50:42 +0800] “-” 400 0 “-” “-” - 113.92.94.95 – - [02/Nov/2012:10:50:42 +0800] “-” 400 0 “-” “-” -
在网上找的方法:修改nginx.conf文件:
client_header_buffer_size 64k;
large_client_header_buffers 4 32k;
nginx日志报大量400错误
123.171.15.177 - - [03/Apr/2012:14:30:42 +0800] "-" 400 0 "-" "-" -
119.161.211.18 - - [03/Apr/2012:14:31:09 +0800] "-" 400 0 "-" "-" - 220.231.30.250 - - [03/Apr/2012:14:31:17 +0800] "-" 400 0 "-" "-" - 119.161.211.18 - - [03/Apr/2012:14:32:17 +0800] "-" 400 0 "-" "-" - 220.231.30.250 - - [03/Apr/2012:14:32:39 +0800] "-" 400 0 "-"
网上给出的方法:更改nginx.conf文件:
client_header_buffer_size 64k;
large_client_header_buffers 4 32k;
更改之后发现不行,后来又找到一个方法。
vim default.conf
server { listen 80 default_server; server_name _; location / { root /data/wangzhan; //网站根目录 index index.html index.htm index.php; } } 这样就可以了,再次查看日志,发现400错误没有了。 (责任编辑:IT) |