From 9f1db2715bbfd54a0aeca3c698813b1a67d1a977 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Tue, 23 Feb 2016 17:53:25 +0100
Subject: [PATCH] ansible-inventories/arocom#11 Enhance apache config for
 extras from Power12

---
 templates/vhost.conf | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/templates/vhost.conf b/templates/vhost.conf
index f58fdaf..d81130c 100644
--- a/templates/vhost.conf
+++ b/templates/vhost.conf
@@ -45,13 +45,27 @@
 {% endif %}
 {% endif %}
   </Directory>
+  <Directory {{ drupalRoot }}/.git/>
+    Require all denied
+  </Directory>
 
   ErrorLog ${APACHE_LOG_DIR}/{{ item.domain }}-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
+  CustomLog ${APACHE_LOG_DIR}/{{ item.domain }}-access.log combined env=!forwarded
+  CustomLog ${APACHE_LOG_DIR}/{{ item.domain }}-access.log proxy env=forwarded
+
+  <IfModule mod_expires.c>
+    ExpiresActive {% if apache_cache.active %}On{% else %}Off{% endif %}
+
+    ExpiresDefault {{ apache_cache.default }}
+{% for type in apache_cache.bytype %}
+    ExpiresByType {{ apache_cache.bytype.type }} {{ apache_cache.bytype.default }}
+{% endfor %}
+  </IfModule>
+
+  SetEnvIf X-Forwarded-Proto https HTTPS=on
 
 {% if item.protocol|default("https") == "https" %}
 {% if item.letsencrypt|default(true) %}
-- 
GitLab