Logging a variable set by nginx's Lua module

Marcin Deranek marcin.deranek at booking.com
Tue Jul 16 16:44:44 UTC 2013


On Tue, 16 Jul 2013 12:22:19 -0400
"danslimmon" <nginx-forum at nginx.us> wrote:

> Thanks for the reply.
> 
> My first thought was to put a "set foo '-'" in the config, but when I
> use this pared-down example that emulates the documentation except to
> replace "content_by_lua" with "rewrite_by_lua":
> 
> https://gist.github.com/danslimmon/1ba367780f0efdd2afc5
> 
> I get "-" in the logs instead of "bar". Is it the "content"/"rewrite"
> difference?

Shouldn't be and works for me (nginx 1.2.8) I noticed that your
example cannot work as you missed semicolon after at the end of line
with set (I get syntax error).

Marcin



More information about the nginx mailing list