On Ubuntu Oneiric 11.10, I thought I'd get clever and add
export RAILS_ENV=production
to /etc/apache2/envvars
so I could DRY up my Apache configs. But it doesn't seem to be accessible from httpd.conf. Digging further, I started using ErrorLog
as a test, and now I'm baffled. Given the following lines in envvars
:
export APACHE_RUN_USER=www-data
export APACHE_RUN_NEWVAR=www-newvar
when I do this:
ErrorLog ${APACHE_LOG_DIR}/${APACHE_RUN_USER}-error.log
I get a file called /var/log/apache2/www-data-error.log
as I'd expect. But when I do this:
ErrorLog ${APACHE_LOG_DIR}/${APACHE_RUN_NEWVAR}-error.log
I instead get /var/log/apache2/${APACHE_RUN_NEWVAR}-error.log
.
I grepped the package source, and APACHE_LOG_DIR
isn't hardcoded anywhere; it shouldn't be special. So what's stopping me from using newly created variables?