Skip to content
Snippets Groups Projects
Commit b81ede88 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-roles/apache#6 Define ErrorLogFormat

parent d03f6030
Branches
No related tags found
No related merge requests found
......@@ -26,10 +26,13 @@
{% endif %}
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
LogLevel warn
{% if apache_version == '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
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
......@@ -78,10 +81,13 @@
Redirect 301 / http://{{alias.to}}/
{% endif %}
ErrorLog ${APACHE_LOG_DIR}/error.log
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
LogLevel warn
{% if apache_version == '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
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
......
......@@ -33,10 +33,13 @@ NameVirtualHost *:443
{% endif %}
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
LogLevel warn
{% if apache_version == '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
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
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
{% for alias in apache_server_default_aliases %}
......@@ -88,10 +91,13 @@ NameVirtualHost *:443
{{cert.type}} /etc/ssl/private/{{cert.file}}
{% endfor %}
ErrorLog ${APACHE_LOG_DIR}/error.log
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
LogLevel warn
{% if apache_version == '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
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
......
......@@ -25,10 +25,13 @@
{% endif %}
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
LogLevel warn
{% if apache_version == '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
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
{% for alias in item.aliases|default([]) %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment