Skip to content
Snippets Groups Projects
Commit a969dafb authored by jurgenhaas's avatar jurgenhaas
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 b94e1d45
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
{% if apache_version|default('2.4') == '2.4' %} {% if apache_version|default('2.4') == '2.4' %}
ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i" ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i"
{% endif %} {% 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 {{ apacheLogDir }}/{{ matomo.domain }}-error.log ErrorLog {{ apacheLogDir }}/{{ matomo.domain }}-error.log
CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log combined env=!forwarded CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log combined env=!forwarded
CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log proxy env=forwarded CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log proxy env=forwarded
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
{% if apache_version|default('2.4') == '2.4' %} {% if apache_version|default('2.4') == '2.4' %}
ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i" ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i"
{% endif %} {% 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 {{ apacheLogDir }}/{{ matomo.domain }}-error.log ErrorLog {{ apacheLogDir }}/{{ matomo.domain }}-error.log
CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log combined env=!forwarded CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log combined env=!forwarded
CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log proxy env=forwarded CustomLog {{ apacheLogDir }}/{{ matomo.domain }}-access.log proxy env=forwarded
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
{% if apache_version|default('2.4') == '2.4' %} {% if apache_version|default('2.4') == '2.4' %}
ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i" ErrorLogFormat "[%{u}t] [%l] [pid %P] [client\ %{X-Forwarded-For}i] %M% ,\ referer:\ %{Referer}i"
{% endif %} {% 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 {{ apacheLogDir }}/{{ certs.domain }}-error.log ErrorLog {{ apacheLogDir }}/{{ certs.domain }}-error.log
CustomLog {{ apacheLogDir }}/{{ certs.domain }}-access.log combined env=!forwarded CustomLog {{ apacheLogDir }}/{{ certs.domain }}-access.log combined env=!forwarded
CustomLog {{ apacheLogDir }}/{{ certs.domain }}-access.log proxy env=forwarded CustomLog {{ apacheLogDir }}/{{ certs.domain }}-access.log proxy env=forwarded
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment