From 66ce5c257ae32e269ede901f1737d04e194a6457 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 5 Oct 2016 12:11:05 -0700 Subject: [PATCH] Update apache tls proxy logs This creates log files per proxy vhost and sets the log level to info to help debug potential issues with tls proxying. Change-Id: I02a62224662b021b35c293909ba045b4b74e1df8 --- lib/apache | 1 + lib/tls | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/apache b/lib/apache index 740f58835e..8a38cc45e5 100644 --- a/lib/apache +++ b/lib/apache @@ -39,6 +39,7 @@ elif is_suse; then APACHE_NAME=apache2 APACHE_CONF_DIR=${APACHE_CONF_DIR:-/etc/$APACHE_NAME/vhosts.d} fi +APACHE_LOG_DIR="/var/log/${APACHE_NAME}" # Functions # --------- diff --git a/lib/tls b/lib/tls index c78ea5b191..6697dc875e 100644 --- a/lib/tls +++ b/lib/tls @@ -476,6 +476,11 @@ $listen_string ProxyPass http://$b_host:$b_port/ retry=5 nocanon ProxyPassReverse http://$b_host:$b_port/ + ErrorLog $APACHE_LOG_DIR/tls-proxy_error.log + ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] [frontend\ %A] %M% ,\ referer\ %{Referer}i" + LogLevel info + CustomLog $APACHE_LOG_DIR/tls-proxy_access.log common + LogFormat "%v %h %l %u %t \"%r\" %>s %b" EOF for mod in ssl proxy proxy_http; do