From fcac40dec8e798acf6396d478b6e610aed63471e Mon Sep 17 00:00:00 2001 From: jgilaber Date: Thu, 30 Jan 2025 12:53:06 +0100 Subject: [PATCH] Direct all apache logs to stdout --- templates/watcher/config/10-watcher-wsgi-main.conf | 9 ++++++--- templates/watcher/config/httpd.conf | 11 +++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/templates/watcher/config/10-watcher-wsgi-main.conf b/templates/watcher/config/10-watcher-wsgi-main.conf index dd9fd00..0663406 100644 --- a/templates/watcher/config/10-watcher-wsgi-main.conf +++ b/templates/watcher/config/10-watcher-wsgi-main.conf @@ -7,7 +7,7 @@ ## Vhost docroot DocumentRoot "/var/www/cgi-bin" - ## Directories, there should at least be a declaration for /var/www/cgi-bin/watcher + ## Directories, there should at least be a declaration for /var/www/cgi-bin Options -Indexes +FollowSymLinks +MultiViews @@ -16,9 +16,12 @@ ## Logging - ErrorLog "/var/log/watcher/error.log" + ErrorLog /dev/stdout ServerSignature Off - CustomLog "/var/log/watcher/access.log" combined env=!forwarded + CustomLog /dev/stdout combined env=!forwarded + CustomLog /dev/stdout proxy env=forwarded + ## set watcher log level to debug + LogLevel debug {{- if $vhost.TLS }} SetEnvIf X-Forwarded-Proto https HTTPS=1 diff --git a/templates/watcher/config/httpd.conf b/templates/watcher/config/httpd.conf index 7154373..3b0788f 100644 --- a/templates/watcher/config/httpd.conf +++ b/templates/watcher/config/httpd.conf @@ -30,11 +30,11 @@ AccessFileName .htaccess HostnameLookups Off - LogLevel debug EnableSendfile On TypesConfig /etc/mime.types Include "/etc/httpd/conf.modules.d/*.conf" + Include "/etc/httpd/conf.d/*.conf" LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%a %l %u %t \"%r\" %>s %b" common @@ -42,6 +42,9 @@ AccessFileName .htaccess LogFormat "%{User-agent}i" agent LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded - CustomLog "/var/log/watcher/access.log" combined env=!forwarded - ErrorLog "/var/log/watcher/error.log" - IncludeOptional "/etc/httpd/conf.d/*.conf" + ErrorLog /dev/stderr + TransferLog /dev/stdout + CustomLog /dev/stdout combined env=!forwarded + CustomLog /dev/stdout proxy env=!forwarded + ## set default apache log level to infor from warning + LogLevel info