Skip to content

Commit

Permalink
fix logging (wip), update log files (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Nov 15, 2024
1 parent f39c8b2 commit 767efef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ if [[ "$1" == "davrods-start" ]]; then
mkdir -p /var/log/apache2
touch /var/log/apache2/apache.access.log
touch /var/log/apache2/apache.error.log
touch /var/log/apache2/other_vhosts_access.log
touch /var/log/apache2/davrods.access.log
touch /var/log/apache2/davrods.error.log

# Remove default webpage and enable davrods
rm -f /etc/apache2/sites-enabled/*
Expand All @@ -34,6 +35,7 @@ if [[ "$1" == "davrods-start" ]]; then
/etc/init.d/apache2 start

# this script must end with a persistent foreground process
tail -F -n0 /var/log/apache2/access.log /var/log/apache2/error.log /var/log/apache2/other_vhosts_access.log
tail -Fq -n0 /var/log/apache2/access.log /var/log/apache2/error.log \
/var/log/apache2/davrods.access.log /var/log/apache2/davrods.error.log

fi
2 changes: 2 additions & 0 deletions docker/templates/davrods-vhost.conf.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<VirtualHost *:80>
ServerName localhost
CustomLog /var/log/apache2/davrods.access.log combined
ErrorLog /var/log/apache2/davrods.error.log

{% if DAVRODS_ENABLE_TICKETS != "0" %}
SetEnvIfExpr "req_novary('Authorization') =~ /^Basic +(.*)/" DAVRODS_BASIC_CREDS64=$1
Expand Down

0 comments on commit 767efef

Please # to comment.