Question about the env

speedfirst nginx-forum at
Sat Nov 13 14:51:54 MSK 2010

I carefully read the code of "ngx_set_env" and "ngx_set_environment".
And I found that once "ngx_set_environment" is invoked, the arguments of
"env" directive is put into "envrion", which makes those variables

However, this works well only when ngx_set_environment is invoked. And
ngx_set_environment will be invoked only when new worker process is
initiated. But in the developement/debug mode (daemon off,
master_process off), the variables will never be put into environ, which
may incur some inconsistent bug when nginx is running in dev mode and
production mode.

Therefore, I think this is a bug.

Posted at Nginx Forum:,150046,150461#msg-150461

More information about the nginx mailing list