support https vhosts without redirects
authorPeter Palfrader <peter@palfrader.org>
Sat, 27 Aug 2016 16:34:52 +0000 (18:34 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 27 Aug 2016 16:34:52 +0000 (18:34 +0200)
modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb

index 75a446e..0ed8409 100644 (file)
@@ -119,7 +119,10 @@ def vhost(lines, sn, kwargs={})
 
                lines << "Use prepare-static-vhost #{sn}"
 
-               if kwargs[:ssl]
+               if kwargs[:ssl] and kwargs[:ssl_optional]
+                       lines << "Use static-vhost-plain-#{sn}"
+                       lines << "Use static-vhost-ssl-#{sn}"
+               elsif kwargs[:ssl]
                        lines << "Use common-dsa-vhost-https-redirect #{sn}"
                        lines << "Use static-vhost-ssl-#{sn}"
                else