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

ansible-roles/apache#6 Define ErrorLogFormat

parent 4156c41d
No related branches found
No related tags found
No related merge requests found
......@@ -13,12 +13,15 @@
Include /etc/apache2/{{ apache_conf_dir }}/global-deny.conf
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
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
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
</VirtualHost>
{% if owncloud_ssl %}
......@@ -37,12 +40,15 @@
Include /etc/apache2/{{ apache_conf_dir }}/global-deny.conf
</Directory>
ErrorLog ${APACHE_LOG_DIR}/ssl_error.log
LogLevel warn
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/ssl_access.log proxy env=forwarded
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
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
SSLEngine on
{% for cert in apache_certificates.0.certs %}
......
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