Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 910 Bytes

system-environment-variable-support.md

File metadata and controls

25 lines (15 loc) · 910 Bytes

系统环境变量的支持

如果你想访问系统环境变量,例如foo,在Lua中通过标准Lua APIos.getenv,同时你应当在nginx.conf文件的环境小节中列出环境变量。例如:

 env foo;

返回目录

English source:

System Environment Variable Support

If you want to access the system environment variable, say, foo, in Lua via the standard Lua API os.getenv, then you should also list this environment variable name in your nginx.conf file via the env directive. For example,

 env foo;

Back to TOC