Answer the question
In order to leave comments, you need to log in
How to stop logging `deny` errors of nginx directive?
There is a list of IP addresses of bots that I block on the server using the deny
. The address file looks like this:
deny Ñ…Ñ….Ñ…Ñ….Ñ…Ñ….Ñ…Ñ…;
deny Ñ…Ñ….Ñ…Ñ….Ñ…Ñ….Ñ…Ñ…;
deny Ñ…Ñ….Ñ…Ñ….Ñ…Ñ….Ñ…Ñ…;
deny Ñ…Ñ….Ñ…Ñ….Ñ…Ñ….Ñ…Ñ…;
[error] 22227#22227: *13997436 access forbidden by rule, client: xx.xx.xx.xx
Answer the question
In order to leave comments, you need to log in
You can redirect all requests from these IPs to an empty file.
Or even simpler - return 444;
Unfortunately, there is no way to exclude these errors from the log. You can increase the logging level to crit, but you won't see all errors like error there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question