Welcome! Log In Create A New Profile

Advanced

stopping an ip from being logged

Posted by commandergc 
stopping an ip from being logged
January 24, 2010 09:29AM
I decided to migrate from apache to nginx and all has gone well so far, except i'm having difficulty trying to work out how to stop certain IP's & host-names from being logged.

under apache all i had to do was this:
[code]
SetEnvIf Remote_Addr "^(192\.168\.1\.[0-9]{1,3})$" dontlog
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
SetEnvIf Remote_Host "\.lan$" dontlog
[/code]
and then add "env=!dontlog" to the end of the custom log line.

is their something similar to this in nginx?
Re: stopping an ip from being logged
January 29, 2010 07:20AM
I don't *think* so. I don't see it in http://wiki.nginx.org/NginxHttpLogModule.

There is support for turning off access logging by location but I don't see it variables such as $remote_addr.

--
Jim Ohlstein
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready