projects
/
ansible.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bump etherpad
[ansible.git]
/
roles
/
apache
/
templates
/
000-default.conf
diff --git
a/roles/apache/templates/000-default.conf
b/roles/apache/templates/000-default.conf
index 8865a0ac29fb5f088210cf38e845f50bb146e02f..0d68ad61f1da6c9b397db3f119599507670aafe7 100644
(file)
--- a/
roles/apache/templates/000-default.conf
+++ b/
roles/apache/templates/000-default.conf
@@
-1,8
+1,14
@@
# 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>
</VirtualHost>
+{% if 'letsencrypt' in group_names %}
<VirtualHost *:443>
Use SSL letsencrypt/live
Redirect temp / https://{{ apache.default_host }}/
</VirtualHost>
<VirtualHost *:443>
Use SSL letsencrypt/live
Redirect temp / https://{{ apache.default_host }}/
</VirtualHost>
+{% endif %}