Skip to content
Snippets Groups Projects
Commit ac3cc718 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-roles/drupal#2 Optimize Apache SSL certificates and redirects

parent 5cb36b26
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,8 @@ NameVirtualHost *:443
<VirtualHost _default_:443>
Include /etc/apache2/{{ apache_conf_dir }}/global-redirect.conf
{% if certs.domain is defined %}
ServerName {{ certs.domain }}
{% endif %}
ServerAlias {{ certs.domain }}{% for alias in certs.aliases|default([]) %} {{ alias }}{% endfor %}
ServerAdmin {{apache_server_admin}}
DocumentRoot /var/www{{apache_server_default_root}}
......@@ -55,8 +54,7 @@ NameVirtualHost *:443
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
{% if certs.redirects is defined %}
{% for alias in certs.redirects %}
{% for alias in certs.aliases|default([]) %}
<VirtualHost _default_:443>
Include /etc/apache2/{{ apache_conf_dir }}/global-redirect.conf
......@@ -76,5 +74,4 @@ NameVirtualHost *:443
</VirtualHost>
{% endfor %}
{% endif %}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment