Fabiano Furtado Pessoa Coelho
April 04, 2022 03:34PM
Hi...

Sorry to bother you with this feature request. I believe you software
engineers already thought about it and there are a million reasons to
not implement it.

Well, I'm exactly in this situation described here
https://serverfault.com/questions/498799/how-to-log-nginx-requests-made-to-a-specific-location-in-a-different-file
I want to use "try_files" and log the access within the location with
"try_files" directive...

location /my_system {
access_log /var/log/nginx/my_system_access.log;
try_files $uri @named_loc;
}
location @named_loc {
access_log off;
proxy_pass http://...;
}

.... and I can't! "Requests are logged in the context of a location
where processing ends. It may be different from the original location,
if an internal redirect happens during request processing."
I can make it work using the "#include" directive and removing the
named location, but using "try_files" is more clean and sophisticated.

Is there a way to include the "now" directive to "access_log"?
Something like: "access_log /var/log/nginx/my_system_access.log now;"

Thanks in advance.
Fabiano
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Feature request to "access_log" directive

Fabiano Furtado Pessoa Coelho April 04, 2022 03:34PM

Re: Feature request to "access_log" directive

Francis Daly April 09, 2022 02:56AM

Re: Feature request to "access_log" directive

Fabiano Furtado Pessoa Coelho April 11, 2022 09:08AM

Re: Feature request to "access_log" directive

Francis Daly April 12, 2022 07:24AM

Re: Feature request to "access_log" directive

Fabiano Furtado Pessoa Coelho April 12, 2022 10:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 267
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