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
 - name: Add monitoring vhost to apache
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
 - name: Enable the status vhost
4
 - name: Enable the status vhost
5
   command: a2ensite 00-status.conf creates=/etc/apache2/sites-enabled/00-status.conf
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
     SetHandler server-status
5
     SetHandler server-status
6
     Require ip 127.0.0.1
6
     Require ip 127.0.0.1
7
   </Location>
7
   </Location>
8
+
9
+  Redirect temp / https://www.{{ domain }}/
8
 </VirtualHost>
10
 </VirtualHost>
9
 
11
 
10
 <VirtualHost *:443>
12
 <VirtualHost *:443>
13
     SetHandler server-status
15
     SetHandler server-status
14
     Require ip 127.0.0.1
16
     Require ip 127.0.0.1
15
   </Location>
17
   </Location>
18
+
19
+  Redirect temp / https://www.{{ domain }}/
16
 </VirtualHost>
20
 </VirtualHost>

Loading…
Cancel
Save