From adb4279de1bfe9abe8077d891232edc33143de9b Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 30 Oct 2022 02:02:46 +0200 Subject: [PATCH] improve logging situation Signed-off-by: szaimen --- Containers/apache/nextcloud.conf | 2 ++ Containers/mastercontainer/Dockerfile | 2 +- Containers/mastercontainer/mastercontainer.conf | 2 ++ Containers/mastercontainer/supervisord.conf | 12 ++++++++---- Containers/nextcloud/supervisord.conf | 6 ++++-- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index 503dafce..7a0b46b2 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -1,5 +1,7 @@ Listen 8000 + ServerName localhost + # Add error log CustomLog ${APACHE_LOG_DIR}/access.log combined ErrorLog ${APACHE_LOG_DIR}/error.log diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index cb0554d7..7f4a3869 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -52,7 +52,7 @@ RUN set -e && \ cd ..; \ rm -f /usr/local/bin/composer; \ chmod 770 -R ./; \ - chown www-data:www-data -R ./; \ + chown www-data:www-data -R /var/www; \ rm -r ./php/data; \ rm -r ./php/session diff --git a/Containers/mastercontainer/mastercontainer.conf b/Containers/mastercontainer/mastercontainer.conf index 3185f911..b343af32 100644 --- a/Containers/mastercontainer/mastercontainer.conf +++ b/Containers/mastercontainer/mastercontainer.conf @@ -11,6 +11,8 @@ ErrorLog ${APACHE_LOG_DIR}/error.log # Http host + ServerName localhost + # PHP match SetHandler application/x-httpd-php diff --git a/Containers/mastercontainer/supervisord.conf b/Containers/mastercontainer/supervisord.conf index aea8aaa0..5072586c 100644 --- a/Containers/mastercontainer/supervisord.conf +++ b/Containers/mastercontainer/supervisord.conf @@ -1,26 +1,28 @@ [supervisord] nodaemon=true -nodaemon=true logfile=/var/log/supervisord/supervisord.log pidfile=/var/run/supervisord/supervisord.pid childlogdir=/var/log/supervisord/ logfile_maxbytes=50MB logfile_backups=10 loglevel=error +user=root [program:apache] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 +# stdout_logfile=/dev/stdout +# stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=apache2-foreground +user=root [program:caddy] stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=sudo -u www-data /usr/bin/caddy run --config /Caddyfile +command=/usr/bin/caddy run --config /Caddyfile +user=www-data [program:cron] stdout_logfile=/dev/stdout @@ -35,6 +37,7 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=/backup-time-file-watcher.sh +user=root [program:session-deduplicator] stdout_logfile=/dev/stdout @@ -42,3 +45,4 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=/session-deduplicator.sh +user=root diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf index a26f8d8c..d6476d44 100644 --- a/Containers/nextcloud/supervisord.conf +++ b/Containers/nextcloud/supervisord.conf @@ -7,13 +7,15 @@ childlogdir=/var/log/supervisord/ logfile_maxbytes=50MB ; maximum size of logfile before rotation logfile_backups=10 ; number of backed up logfiles loglevel=error +user=root [program:php-fpm] stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +# stderr_logfile=/dev/stderr +# stderr_logfile_maxbytes=0 command=php-fpm +user=root [program:cron] stdout_logfile=/dev/stdout