Skip to content
Snippets Groups Projects
Commit 17797a52 authored by ale's avatar ale
Browse files

Make LogLevel configurable from env (2nd attempt)

parent 4cf1e526
No related branches found
No related tags found
No related merge requests found
Pipeline #59436 failed
...@@ -60,9 +60,12 @@ rsync -a /tmp/conf/ /etc/ ...@@ -60,9 +60,12 @@ rsync -a /tmp/conf/ /etc/
# Set the Apache syslog program # Set the Apache syslog program
APACHE_SYSLOG_TAG_DEFAULT=apache APACHE_SYSLOG_TAG_DEFAULT=apache
echo "export APACHE_SYSLOG_TAG=\${APACHE_SYSLOG_TAG:-${APACHE_SYSLOG_TAG_DEFAULT}}" >> /etc/apache2/envvars echo "export APACHE_SYSLOG_TAG=\${APACHE_SYSLOG_TAG:-${APACHE_SYSLOG_TAG_DEFAULT}}" >> /etc/apache2/envvars
echo "export APACHE_LOG_LEVEL=\${APACHE_LOG_LEVEL:-warn}" >> /etc/apache2/envvars
# Fix Apache error logging. # Fix Apache error logging.
sed -i -e 's@^ErrorLog.*$@ErrorLog "|/usr/bin/logger -p daemon.error -t \${APACHE_SYSLOG_TAG}"@' /etc/apache2/apache2.conf sed -i -e 's@^ErrorLog.*$@ErrorLog "|/usr/bin/logger -p daemon.error -t \${APACHE_SYSLOG_TAG}"@' \
-e 's,^LogLevel .*,LogLevel ${APACHE_LOG_LEVEL},' \
/etc/apache2/apache2.conf
# Make APACHE_RUN_USER externally configurable (defaults to www-data if unset) # Make APACHE_RUN_USER externally configurable (defaults to www-data if unset)
# and fix some paths used by apache2 to be container-friendly. # and fix some paths used by apache2 to be container-friendly.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment