Want to access UNIX environment variable

Jonathan Matthews contact at jpluscplusm.com
Wed Feb 27 10:50:46 UTC 2013

On 27 February 2013 06:49, amodpandey <nginx-forum at nginx.us> wrote:
> Hi,
> I have system where I have defined OS environment variable $ENV=prod or dev.
> I want to access this variable inside my nginx configuration. Please help.
> I have tried -g "env ENV" in command line. But how do I access it? $ENV does
> not work?

No, this isn't supported - both specifically what you tried, and the
more general "envvars in config" concept.
You'll have to find another way to achieve what you want.

Jonathan Matthews // Oxford, London, UK

More information about the nginx mailing list