diff --git a/templates/vhost.conf b/templates/vhost.conf
index abf74a0715d1ea9380e93877616c71ce7a9682a2..112a52e991525933e960e6b32bbacce754e79929 100644
--- a/templates/vhost.conf
+++ b/templates/vhost.conf
@@ -99,12 +99,14 @@
     <RequireAny>
 {% if drupal_domain.apache_auth.extra_users is defined %}
 {% for user in drupal_domain.apache_auth.extra_users %}
-      <RequireAll>
 {% if user.expression is defined %}
+      <RequireAll>
         Require expr "{{ user.expression }}"
-{% endif %}
         Require user {{ user.user }}
       </RequireAll>
+{% else %}
+      Require user {{ user.user }}
+{% endif %}
 {% endfor %}
 {% endif %}
 {% if drupal_domain.apache_auth.ips is defined %}