From e7b30b40390a7efe8ceb1c399ef2b8a5e665fcef Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Mon, 20 May 2019 11:26:55 +0200
Subject: [PATCH] Change default for alias_redirect to false and handle it for
 HaProxy too

---
 templates/vhost.conf | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/templates/vhost.conf b/templates/vhost.conf
index f8048b3..66b8de6 100644
--- a/templates/vhost.conf
+++ b/templates/vhost.conf
@@ -5,7 +5,7 @@
 {% if drupal_domain.protocol|default("https") == "https" and groups.proxyserver is not defined %}
   ServerAdmin {{ apache_server_admin }}
   ServerName  {{ drupal_domain.domain }}
-{% if not drupal_domain.aliases_redirect|default(False) %}
+{% if not drupal_domain.aliases_redirect|default(True) %}
   ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}
 {% endif %}
 
@@ -35,7 +35,7 @@
 {% endif %}
   ServerAdmin {{ apache_server_admin }}
   ServerName  {{ drupal_domain.domain }}
-{% if not drupal_domain.aliases_redirect|default(False) %}
+{% if not drupal_domain.aliases_redirect|default(True) %}
   ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}
 {% endif %}
 
@@ -163,14 +163,14 @@
 {% endif %}
 </VirtualHost>
 {% endif %}
-{% if (drupal_domain.redirects is defined or drupal_domain.aliases_redirect|default(False)) and groups.proxyserver is not defined %}
+{% if (drupal_domain.redirects is defined or drupal_domain.aliases_redirect|default(True)) and groups.proxyserver is not defined %}
 
 <VirtualHost *:80>
   Include /etc/apache2/{{ apache_conf_dir }}/global-redirect.conf
 
   ServerAdmin {{ apache_server_admin }}
   ServerName  dummy.{{ drupal_domain.domain }}
-  ServerAlias {% for redirect in drupal_domain.redirects|default([]) %} {{ redirect }}{% endfor %}{% if drupal_domain.aliases_redirect|default(False) %}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% endif %}
+  ServerAlias {% for redirect in drupal_domain.redirects|default([]) %} {{ redirect }}{% endfor %}{% if drupal_domain.aliases_redirect|default(True) %}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% endif %}
 
 {% for line in drupal_domain.aliases_redirect_extras|default([]) %}
   {{ line }}
@@ -188,7 +188,7 @@
 
   ServerAdmin {{ apache_server_admin }}
   ServerName  dummy.{{ drupal_domain.domain }}
-  ServerAlias {% for redirect in drupal_domain.redirects|default([]) %} {{ redirect }}{% endfor %}{% if drupal_domain.aliases_redirect|default(False) %}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% endif %}
+  ServerAlias {% for redirect in drupal_domain.redirects|default([]) %} {{ redirect }}{% endfor %}{% if drupal_domain.aliases_redirect|default(True) %}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% endif %}
 
   Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
 
-- 
GitLab