Why doesn't apache2 respect my envvars file?
Posted
by
Avery Chan
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Avery Chan
Published on 2012-06-05T08:35:50Z
Indexed on
2012/06/06
4:47 UTC
Read the original article
Hit count: 379
apache
|environment-variables
My envvar files has these lines in it:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
My apache2.conf has these lines in it:
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
But when I run apache2 -M
I get this:
apache2: bad user name ${APACHE_RUN_USER}
A temporary fix is to hard-code www-data
into it my apache2.conf file. There was some speculation here that this was because some configuration script didn't replace the env vars correctly in my apache2.conf file. Regardless how do I get apache2 to consult my envvars file?
As another data point this site seems to indicate the envvars is generated at build, but read by apache2ctl at runtime, suggesting that this file isn't just poop leftover by the build process.
© Ask Ubuntu or respective owner