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

Define log format everywhere

parent 7497b6b6
No related branches found
No related tags found
No related merge requests found
......@@ -57,5 +57,13 @@
{% else %}
Redirect 301 / http://{{alias.to}}/
{% endif %}
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
</VirtualHost>
{% endfor %}
......@@ -63,6 +63,14 @@ NameVirtualHost *:443
{% for cert in certs %}
{{cert.type}} /etc/ssl/private/{{cert.file}}
{% endfor %}
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
</VirtualHost>
{% endfor %}
{% endif %}
......
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