Skip to content

Commit

Permalink
Direct all apache logs to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
cescgina authored and openshift-merge-bot[bot] committed Jan 31, 2025
1 parent bf33fbf commit fcac40d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions templates/watcher/config/10-watcher-wsgi-main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Directory "/var/www/cgi-bin">
Options -Indexes +FollowSymLinks +MultiViews
Expand All @@ -16,9 +16,12 @@
</Directory>

## 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
Expand Down
11 changes: 7 additions & 4 deletions templates/watcher/config/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ 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
LogFormat "%{Referer}i -> %U" referer
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

0 comments on commit fcac40d

Please sign in to comment.