Pass Lua variable in proxy pass directive

husaindalroti nginx-forum at
Tue May 31 05:53:20 UTC 2022

Hi Team,

Is it possible to pass lua variable in proxy pass directive which we define
using set_by_lua_file directive ?

Example :
set_by_lua_file $ref test.lua; 
proxy_pass '$ref';

Below is lua code :

local function main()
    local host=""
    return host

return main()

Posted at Nginx Forum:,294355,294355#msg-294355

More information about the nginx mailing list