Skip to content

Added APACHE_LOG_DIR environment variable.#231

Closed
ziplizard wants to merge 1 commit intodocker-library:masterfrom
ziplizard:master
Closed

Added APACHE_LOG_DIR environment variable.#231
ziplizard wants to merge 1 commit intodocker-library:masterfrom
ziplizard:master

Conversation

@ziplizard
Copy link

This caused me all kinds of problems trying to find this when adding my own vhost.

This caused me all kinds of problem trying to find this when adding my own vhost.
@tianon
Copy link
Member

tianon commented May 23, 2016

This needs to be added to apache-Dockerfile-block-1 at the top level, preferably right before we start messing with the .conf file, ie

RUN a2dismod mpm_event && a2enmod mpm_prefork
RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist && rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/*
.

It should also have a suitable comment something like # several Debian-supplied Apache configuration files assume the availability of certain environment variables (specifying generically in this way in case we run into more issues with this in the future).

@tianon
Copy link
Member

tianon commented May 23, 2016

An alternative worth considering (IMO) is to adjust apache2-foreground to source /etc/apache2/envvars similar to what the init.d script does, although we'll want to verify that the defaults in that file match what we've configured in our own apache2.conf file.

@twang2218
Copy link
Contributor

I agree with @tianon , source /etc/apache2/envvars should be added to apache2-foreground script. I faced the same situation, I added a vhost which need to specify the log directory to {APACHE_LOG_DIR}/xxxx-access.log, however, without the source statement, I got following error:

AH00111: Config variable ${APACHE_LOG_DIR} is not defined

I have to create a copy of apache2-foreground with the source modification to make it boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants