Welcome! Log In Create A New Profile

Advanced

Re: disable logging images or seperate image log files

May 26, 2009 01:44PM
Pahud wrote:
> Hello list,
>
> After some google search I guess this is yet discussed before. How do I:
>
> 1) disable nginx logging image requests(no . logging in access_log)

location ~* \.(gif|jpg|png) {
access_log off;
...
}

Or if all are in a directory and it's subdirectories:

location ^~ /images/ {
access_log off;
...
}


See
> 2) keep logging image requests, but seperate it to another
> file(main_access.log and img_access.log)


location ~* \.(gif|jpg|png)$ {
access_log /path/to/access.log;
...
}
> 3) disable logging requests of some pattern or log them on another file

Use a regex in "location" block. See
http://wiki.nginx.org/NginxHttpCoreModule#location.
>
> Any examples are appreciated.
>
> pahud

Jim
Subject Author Posted

disable logging images or seperate image log files

Pahud May 26, 2009 01:22PM

Re: disable logging images or seperate image log files

Jim Ohlstein May 26, 2009 01:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready