From a4e75324406cde824a7a055a5ad8b96f7226b0c2 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Tue, 22 Dec 2020 10:24:17 +0100 Subject: [PATCH] Encapsulate ip in apache access log to cover proxy forwarded multiple ips separated by comma and space --- templates/etc-apache2-sites-available-owncloud | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/etc-apache2-sites-available-owncloud b/templates/etc-apache2-sites-available-owncloud index 13ebb06..fdbbdb3 100644 --- a/templates/etc-apache2-sites-available-owncloud +++ b/templates/etc-apache2-sites-available-owncloud @@ -18,7 +18,7 @@ {% if apache_version|default('2.4') == '2.4' %} ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i" {% endif %} - LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy + LogFormat "\"%{X-Forwarded-For}i\" %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded @@ -45,7 +45,7 @@ {% if apache_version|default('2.4') == '2.4' %} ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i" {% endif %} - LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy + LogFormat "\"%{X-Forwarded-For}i\" %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy ErrorLog ${APACHE_LOG_DIR}/ssl_error.log CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined env=!forwarded CustomLog ${APACHE_LOG_DIR}/ssl_access.log proxy env=forwarded -- GitLab