Browse code

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

Clark Boylan authored on 2016/10/06 04:11:05
Showing 2 changed files
... ...
@@ -39,6 +39,7 @@ elif is_suse; then
39 39
     APACHE_NAME=apache2
40 40
     APACHE_CONF_DIR=${APACHE_CONF_DIR:-/etc/$APACHE_NAME/vhosts.d}
41 41
 fi
42
+APACHE_LOG_DIR="/var/log/${APACHE_NAME}"
42 43
 
43 44
 # Functions
44 45
 # ---------
... ...
@@ -476,6 +476,11 @@ $listen_string
476 476
         ProxyPass http://$b_host:$b_port/ retry=5 nocanon
477 477
         ProxyPassReverse http://$b_host:$b_port/
478 478
     </Location>
479
+    ErrorLog $APACHE_LOG_DIR/tls-proxy_error.log
480
+    ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] [frontend\ %A] %M% ,\ referer\ %{Referer}i"
481
+    LogLevel info
482
+    CustomLog $APACHE_LOG_DIR/tls-proxy_access.log common
483
+    LogFormat "%v %h %l %u %t \"%r\" %>s %b"
479 484
 </VirtualHost>
480 485
 EOF
481 486
     for mod in ssl proxy proxy_http; do