Feature request to "access_log" directive

Fabiano Furtado Pessoa Coelho fusca14 at gmail.com
Tue Apr 12 14:51:13 UTC 2022


Thank you very much, Francis!

Indeed, it was a permission issue on the filesystem.

Again, my bad! Sorry to bother this mailing list with this basic issue.

On Tue, Apr 12, 2022 at 8:22 AM Francis Daly <francis at daoine.org> wrote:
>
> On Mon, Apr 11, 2022 at 10:02:40AM -0300, Fabiano Furtado Pessoa Coelho wrote:
>
> Hi there,
>
> > I've one more question about an access_log weird behavior, when it's
> > configured with a $1 regex return variable.
>
> http://nginx.org/r/access_log -- The file path can contain variables
>
> > For instance:
> >
> > location ~ ^/(system1|system2) {
> >   access_log /var/log/nginx/$1_access.log;
> >   proxy_pass ...;
> > }
> >
> > The only way NGINX can write to system1_access.log and
> > system2_access.log files is when they exist in the specified
> > directory. Otherwise, the log isn't computed.
>
> My guess is that
>
> """
> the user whose credentials are used by worker processes should have
> permissions to create files in a directory with such logs;
> """
>
> is not the case.
>
> $ ls -ld /var/log/nginx/
> $ ls -l /var/log/nginx/system1_access.log
>
> might show the users and permissions involved.
>
> Good luck with it,
>
>         f
> --
> Francis Daly        francis at daoine.org
> _______________________________________________
> nginx mailing list -- nginx at nginx.org
> To unsubscribe send an email to nginx-leave at nginx.org



More information about the nginx mailing list