Commit b754cb4c authored by ale's avatar ale

Redirect logs to local4 by default

This will cause the local rsyslog daemon to *not* forward them to
the centralized collector, to avoid duplicating HTTP access logs
that are already generated by nginx.
parent 3cd26e68
Pipeline #6803 passed with stages
in 1 minute and 58 seconds
......@@ -26,6 +26,11 @@ APACHE_MODULES_ENABLE="
setenvif
"
# Config snippets to enable.
APACHE_CONFIG_ENABLE="
logging
"
# Config snippets to disable.
APACHE_CONFIG_DISABLE="
other-vhosts-access-log
......@@ -65,6 +70,7 @@ echo "export APACHE_EXPORTER_PORT=\`expr \$APACHE_PORT + 100\`" >> /etc/apache2/
# Enable the default modules.
a2enmod -q ${APACHE_MODULES_ENABLE}
a2dismod -q -f ${APACHE_MODULES_DISABLE}
a2enconf -q -f ${APACHE_CONFIG_ENABLE}
a2disconf -q -f ${APACHE_CONFIG_DISABLE}
# Create the directories that Apache will need at runtime,
......
LogFormat "%{Host}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" http_host_combined
CustomLog "|/usr/bin/logger -t apache -p local4.info" http_host_combined
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment