Nginx and conditional logformat

Francis Daly francis at
Fri Aug 2 14:01:02 UTC 2019

On Fri, Aug 02, 2019 at 04:34:37AM -0400, cello86 at wrote:

Hi there,

> I need to use if to configure some behavior during the ssl client
> authentication because it's enabled at server block and we need to exclude
> some locations from the authentication.

The report I thought I was responding to was that a variable that is
"set" inside an "if" inside a "location", does not appear to have the
"set" value outside that "if" (for the access_log directive).

In that case, defining the variable in a "map" at "http" level and only
referring to it in the access_log directive, should Just Work.

If it doesn't work for you, then I guess you'll need to find some

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list