Browse Source

Ensure we're always redirecting to the main homepage with www prepended.

Thomas Buck 5 years ago
parent
commit
c5e64be53b

+ 1
- 1
roles/monitoring/tasks/monit.yml View File

@@ -1,5 +1,5 @@
1 1
 - name: Add monitoring vhost to apache
2
-  copy: src=etc_apache2_sites-available_00-status.conf dest=/etc/apache2/sites-available/00-status.conf
2
+  template: src=etc_apache2_sites-available_00-status.conf dest=/etc/apache2/sites-available/00-status.conf
3 3
 
4 4
 - name: Enable the status vhost
5 5
   command: a2ensite 00-status.conf creates=/etc/apache2/sites-enabled/00-status.conf

roles/monitoring/files/etc_apache2_sites-available_00-status.conf → roles/monitoring/templates/etc_apache2_sites-available_00-status.conf View File

@@ -5,6 +5,8 @@
5 5
     SetHandler server-status
6 6
     Require ip 127.0.0.1
7 7
   </Location>
8
+
9
+  Redirect temp / https://www.{{ domain }}/
8 10
 </VirtualHost>
9 11
 
10 12
 <VirtualHost *:443>
@@ -13,4 +15,6 @@
13 15
     SetHandler server-status
14 16
     Require ip 127.0.0.1
15 17
   </Location>
18
+
19
+  Redirect temp / https://www.{{ domain }}/
16 20
 </VirtualHost>

Loading…
Cancel
Save