简体   繁体   中英

Apache2 PassEnv on Ubuntu

I want to pass a system-wide variable to Apache so I can pass it to executed scripts using PassEnv. Basically a script executed Apache executes a shell script, that shell script wont run without the variable being set.

But Ubuntu devs did this in the startup script:

ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin"

Resulting in variables from /etc/environment to be discarded. Can I fix this without modifying the startup script?

Turns out you can pass along vars in /etc/apache2/envvars. Still sucks though.

Nope. The value stays empty.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM