How to disable access_log to images but log 404s

Wandenberg Peixoto wandenberg at gmail.com
Thu Oct 30 14:31:00 UTC 2014


Try to set log_not_found
<http://nginx.org/en/docs/http/ngx_http_core_module.html#log_not_found> to
off

On Thu, Oct 30, 2014 at 11:56 AM, Igal @ getRailo.org <igal at getrailo.org>
wrote:

> hi,
>
> I am suppressing the access_log for images and other files in the /res/
> directory:
>
>      location ^~ /res/ {
>
>         error_page  404  /res/images/100candles-logo-square.png;
>         expires     14d;
>         access_log  off;
>     }
>
> but I would like to log the 404s in the access_log
>
> how can I do that?
>
> TIA
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20141030/a9d6cf6e/attachment.html>


More information about the nginx mailing list