lua-nginx-module icon indicating copy to clipboard operation
lua-nginx-module copied to clipboard

NGINX set variable not working

Open Lalith-0110 opened this issue 3 years ago • 1 comments

I have already set the variable start_time in my nginx config but somehow that variable is not getting picked up in access_log. We have so many variables set the same way and everything else works.

set $start_time ' ';

2022/06/10 14:45:18 [error] 43558#43558: *13295093 lua entry thread aborted: runtime error: /apps_01/apigw/etc/nginx/lua/something.lua:40: variable "start_time" not found for writing; maybe it is a built-in variable that is not changeable or you forgot to use "set $start_time '';" in the config file to define it first stack traceback:

Lalith-0110 avatar Jun 13 '22 20:06 Lalith-0110

Can you post the minimized configuration for problem reproduction?

cppcoffee avatar Jun 16 '22 08:06 cppcoffee