ansible/roles/apache-rails/templates/project-ssl.conf in subspace-0.4.1 vs ansible/roles/apache-rails/templates/project-ssl.conf in subspace-0.4.2

- old
+ new

@@ -1,16 +1,21 @@ <VirtualHost *:80> ServerName {{server_name}} {% for alias in server_aliases %} ServerAlias {{alias}} {% endfor %} - RewriteEngine On - RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=302,L] + + {% if canonical_domain is defined %} + Redirect / "https://{{canonical_domain}}/" + {% else %} + Redirect / "https://%{HTTP_HOST}/" + {% endif %} </VirtualHost> <IfModule mod_ssl.c> <VirtualHost *:443> {% include "_rails.conf" %} - {{apache_ssl_config}} + {{apache_ssl_config | indent(8, true)}} + {% include "_canonical_domain.conf" %} </VirtualHost> </IfModule>