Welcome! Log In Create A New Profile

Advanced

Re: Deny certain words

Steve Wilson
September 03, 2014 10:34AM
On 02/09/2014 17:38, Grozdan wrote:
> On Tue, Sep 2, 2014 at 3:09 PM, Maxim Dounin <mdounin@mdounin.ru>
> wrote:
>> Hello!
>>
>> On Tue, Sep 02, 2014 at 12:17:12PM +0100, Steve Wilson wrote:
>>
>>> Torrent clients have their own user agent normally, I had a need a
>>> while
>>> back to block some which we used the magic 444 to kill it.
>>>
>>> if ($http_user_agent ~* (uTorrent|Transmission) ) {
>>> return 444;
>>> break;
>>> }
>>
>> Just a note: you don't need "break" here.
>>
>> --
>> Maxim Dounin
>> http://nginx.org/
>
> 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.
>
> Thanks

You could try;

access_log off;

Steve.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Deny certain words

microchip September 02, 2014 07:10AM

Re: Deny certain words

Steve Wilson September 02, 2014 07:18AM

Re: Deny certain words

microchip September 02, 2014 07:34AM

Re: Deny certain words

Maxim Dounin September 02, 2014 09:10AM

Re: Deny certain words

microchip September 02, 2014 12:40PM

Re: Deny certain words

Steve Wilson September 03, 2014 10:34AM

Re: Deny certain words

Steve Wilson September 03, 2014 11:08AM

Re: Deny certain words

microchip September 03, 2014 11:14AM

Re: Deny certain words

microchip September 03, 2014 11:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready