Nginx Proxy redirect to clients when upstreams are busy

Maxim Dounin mdounin at mdounin.ru
Mon Dec 14 15:06:45 UTC 2015


Hello!

On Fri, Dec 11, 2015 at 09:34:41PM +0000, Prasanna Khanapur wrote:

> Hi maxim,
> Thanks a lot.  Could give some inputs on how to export variable from inside
> my module? I'm kind of new to nginx variable stuff. Do I need it to use
> other modules like lua,resty? I would prefer to avoid them if possible.

Variables can be exported by any module using the 
ngx_http_add_variable() function.  Take a look, e.g., on the 
secure link module (src/http/modules/ngx_http_secure_link_module.c), 
it contains a mostly trivial example on how to export variables 
with predefined names.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list