Fix webdav in locations
diff --git a/apache/files/_locations.conf b/apache/files/_locations.conf
index 721b9e6..5ff7ac7 100644
--- a/apache/files/_locations.conf
+++ b/apache/files/_locations.conf
@@ -6,15 +6,17 @@
   {%- else %}
   Alias {{ location.uri }} {{ location.path }}
   {%- endif %}
-  {%- if location.auth is defined %}
-  {%- set auth = location.auth %}
-  <Location {{ location.uri }}>
-  {%- include "apache/files/_auth.conf" %}
-  </Location>
+
+  <Location />
+  {%- if location.auth is defined%}
+    {%- set auth = location.auth %}
+    {%- include "apache/files/_auth.conf" %}
   {%- endif %}
 
   {%- if location.webdav is defined %}
-  Dav {% if location.webdav.get('enabled', True) %}on{% else %}off{% endif %}
+    Dav {% if location.webdav.get('enabled', True) %}on{% else %}off{% endif %}
   {%- endif %}
+  </Location>
+
   {%- endfor %}
   {%- endif %}
diff --git a/apache/files/static.conf b/apache/files/static.conf
index 58a91c3..d461016 100644
--- a/apache/files/static.conf
+++ b/apache/files/static.conf
@@ -16,16 +16,16 @@
     allow from all
   </Directory>
 
-  {%- if site.auth is defined or site.webdav is defined %}
   <Location />
-  {%- set auth = site.auth %}
-  {%- include "apache/files/_auth.conf" %}
+  {%- if site.auth is defined%}
+    {%- set auth = site.auth %}
+    {%- include "apache/files/_auth.conf" %}
+  {%- endif %}
 
   {%- if site.webdav is defined %}
-  Dav {% if site.webdav.get('enabled', True) %}on{% else %}off{% endif %}
+    Dav {% if site.webdav.get('enabled', True) %}on{% else %}off{% endif %}
   {%- endif %}
   </Location>
-  {%- endif %}
 
   {%- include "apache/files/_locations.conf" %}
 </VirtualHost>