I'm running nginx behind haproxy (running on the same server). I've configured haproxy to use a simple html file on nginx to verify the service is up, since I don't have/want a valid "/" URL on this host. Nginx doesn't support the OPTIONS request type (as far as I know) which is the default that haproxy uses, so I've changed it to a GET.
Since I have access logs turned on in nginx, I'm getting all these uptime poll requests in my access log. Is there a way that I can configure nginx to ignore certain requests, and skip logging them?
Here's the haproxy backend:
backend static_http
option httpchk GET /test.html
option redispatch
balance roundrobin
#fullconn 1000
server w1_static www1:81 check port 81 inter 2000
And Here's what I see in the nginx logs:
127.0.0.1 - - [24/Jul/2009:19:28:22 +0000] "GET /test.html HTTP/1.0" 200 12 "-" "-"
127.0.0.1 - - [24/Jul/2009:19:28:24 +0000] "GET /test.html HTTP/1.0" 200 12 "-" "-"
127.0.0.1 - - [24/Jul/2009:19:28:26 +0000] "GET /test.html HTTP/1.0" 200 12 "-" "-"
127.0.0.1 - - [24/Jul/2009:19:28:28 +0000] "GET /test.html HTTP/1.0" 200 12 "-" "-"
127.0.0.1 - - [24/Jul/2009:19:28:30 +0000] "GET /test.html HTTP/1.0" 200 12 "-" "-"