引用:
原帖由 licess 于 2018-8-6 20:12 发表 
上面日志上都已经显示444了,不需要处理
要屏蔽掉head 之类的http方法可以论坛搜索: 屏蔽 http 方法
已在NGINX文件中添加了 if ($request_method !~* GET|POST|HEAD) {return 403;}
但在日志中依然发现了这样的访问:
180.97.106.39 - - [09/Aug/2018:03:03:51 +0800] "\x05\x02\x00\x02" 400 166 "-" "-" - 4.170 - - -
120.132.3.65 - - [09/Aug/2018:09:26:34 +0800] "\x00\x9C\x00\x01\x1A+<M\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03\xFF\xFF\x00\x01local\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cananian\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 166 "-" "-" - 0.014 - - -
......
像这些的都是什么访问格式?如何禁止?
引用:
这样添加的内容不对?
server{
listen 80;
server_name abc.def.com; //在下面添加不对?nginx -t显示正确
if ($request_method !~* GET|POST|HEAD) {
return 403;
}
index index.html index.php;
root /home/abc;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
include enable-php.conf;
location /favicon.ico{
log_not_found off;
access_log off;
}