How to disable access_log to images but log 404s

grrm grrm grrm77 at gmail.com
Thu Oct 30 18:15:42 UTC 2014


Hi. Maybe you can do something like:
     location ^~ /res/ {
        error_page  404  /res/images/100candles-logo-square.png;
        expires     14d;
        access_log  off;
        location = /res/images/100candles-logo-square.png {
            access_log  on;
        }
    }


2014-10-30 15:56 GMT+02:00 Igal @ getRailo.org <igal at getrailo.org>:
> 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



More information about the nginx mailing list