http { set $test 'hello world'; location { content_by_lua ' ngx.header.content_type="text/plain"; ngx.say (ngx.var.test); '; } }