if ($http_user_agent ~* (uTorrent|Transmission) ) {
Hi,
As reported, the above code returns 444 on torrent clients trying to
connect. However, my access logs get filled with nginx sending a 444
response to clients. Is there a way to filter this? I’m currently
using grep -v ‘info_hash’ to filter but it’ll be better if nginx can
do this instead.
As reported, the above code returns 444 on torrent clients trying to
connect. However, my access logs get filled with nginx sending a 444
response to clients. Is there a way to filter this? I’m currently
using grep -v ‘info_hash’ to filter but it’ll be better if nginx can
do this instead.
I’ve just thought of another angle for this. Is this hitting your
default/only site? If it’s got a host header you could create a site
just for that that bins all requests off with a 444 and no logging.
I’ve just thought of another angle for this. Is this hitting your
default/only site? If it’s got a host header you could create a site just
for that that bins all requests off with a 444 and no logging.
Yes, it’s the only site. I will try what you suggested. Thanks!
Well, just as I went and try what you suggested I came on the nginx
docs where it says you can use ‘map directive’ to decide what to log
or not so I tried the below and it works
Below goes inside http { … }
map $status $loggable {
~^444 0;
default 1;
}
and in the vhost inside server { … } goes the below
I’ve just thought of another angle for this. Is this hitting your
default/only site? If it’s got a host header you could create a site just
for that that bins all requests off with a 444 and no logging.
Yes, it’s the only site. I will try what you suggested. Thanks!
after the = come long strings of seemingly random hashes torrent