From c3a3f032c3dce5b7dc8d919a8409600dc1042df9 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Thu, 27 Dec 2018 11:29:36 +0100
Subject: [PATCH] Prepare apache for letsencrypt challenge webroot

---
 defaults/main.yml    | 3 ---
 templates/vhost.conf | 3 +--
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/defaults/main.yml b/defaults/main.yml
index fab7f1a..a5fd018 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -26,9 +26,6 @@ drupal_post_deploy_tasks:
     - 'sset system.maintenance_mode 0'
     - 'cache-rebuild'
 
-letsencrypt_pause_services:
-  - 'apache2'
-
 fstype_convert:
   btrfs: 'btrfs-convert --no-progress {{ item.src }}'
   ext4: 'mkfs.ext4 {{ item.src }}'
diff --git a/templates/vhost.conf b/templates/vhost.conf
index a3fe378..69c9ad5 100644
--- a/templates/vhost.conf
+++ b/templates/vhost.conf
@@ -9,8 +9,7 @@
   ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}
 {% endif %}
 
-  RewriteEngine on
-  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
+  Include /etc/apache2/{{ apache_conf_dir }}/letsencrypt-redirect.conf
 
   SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
 {% if drupal_domain.apache_log is defined %}
-- 
GitLab