Commit 1898b758 authored by Jürgen Haas's avatar Jürgen Haas
Browse files

Encapsulate ip in apache access log to cover proxy forwarded multiple ips...

Encapsulate ip in apache access log to cover proxy forwarded multiple ips separated by comma and space
parent 25571706
......@@ -14,7 +14,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}/{{ artifactory_domain }}-error.log
CustomLog ${APACHE_LOG_DIR}/{{ artifactory_domain }}-access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/{{ artifactory_domain }}-access.log proxy env=forwarded
......@@ -44,7 +44,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}/{{ artifactory_domain }}-error.log
CustomLog ${APACHE_LOG_DIR}/{{ artifactory_domain }}-access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/{{ artifactory_domain }}-access.log proxy env=forwarded
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment