nginx access logs ignore certain requests
Solution 1:
You can now do this
http://nginx.org/en/docs/http/ngx_http_log_module.html
The if parameter (1.7.0) enables conditional logging. A request will not be logged if the condition evaluates to “0” or an empty string
map $request_uri $loggable {
/ 0;
/healthcheck.html 0;
default 1;
}
server {
...
access_log /var/log/nginx/access.log combined if=$loggable;
}
Solution 2:
Well, you could try having a specific location directive for this.
Something like
location /test.html {
access_log off;
}
should work (untested)...