projects
/
ansible.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e77c174
)
only redirect to https if we have letsencrypt
author
Ralf Jung
<post@ralfj.de>
Sun, 17 Jun 2018 21:08:35 +0000
(23:08 +0200)
committer
Ralf Jung
<post@ralfj.de>
Sun, 17 Jun 2018 21:08:35 +0000
(23:08 +0200)
roles/apache/templates/000-default.conf
patch
|
blob
|
history
diff --git
a/roles/apache/templates/000-default.conf
b/roles/apache/templates/000-default.conf
index 23f6f5e4ce817ed2256e00ee7ef39ab0afd96746..0d68ad61f1da6c9b397db3f119599507670aafe7 100644
(file)
--- a/
roles/apache/templates/000-default.conf
+++ b/
roles/apache/templates/000-default.conf
@@
-1,6
+1,10
@@
# redirect all undefined virtual hosts to {{ apache.default_host }}
<VirtualHost *:80>
# redirect all undefined virtual hosts to {{ apache.default_host }}
<VirtualHost *:80>
+{% if 'letsencrypt' in group_names %}
Redirect temp / https://{{ apache.default_host }}/
Redirect temp / https://{{ apache.default_host }}/
+{% else %}
+ Redirect temp / http://{{ apache.default_host }}/
+{% endif %}
</VirtualHost>
{% if 'letsencrypt' in group_names %}
<VirtualHost *:443>
</VirtualHost>
{% if 'letsencrypt' in group_names %}
<VirtualHost *:443>