Filtering out non-HTTP requests (400 errors)

Grzegorz Nosek grzegorz.nosek at gmail.com
Tue Jan 12 12:19:07 MSK 2010


On Mon, Jan 11, 2010 at 09:22:32AM -0800, Michael Shadle wrote:
> I want to have it basically say:
> 
> if ($remote_addr ~* 10.2.34.3) {
>  access_log off;
> }
> 
> Or something of the nature. Note: that is pseudocode, I probably
> messed up the ~* but I just woke up. It was an example :)
> 
> I think I tried this and it didn't work (and I'm sure Grzegorz tried it too)

Actually I didn't because all the clients are running on the same
machines as the haproxy servers. haproxy is used mostly for HA and
abstracting the configuration somewhat (every machine has its private
haproxy and clients there connect to 127.0.0.1). So I guess I can't use
any techniques that usually accompany load balancer detection due to
100% false positive rate.

BTW, I tried messing with $request and $request_uri but without success
(I expected either an empty string or a dash, as in access.log).

Best regards,
 Grzegorz Nosek



More information about the nginx mailing list