]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Make a common-dsa-vhost-https-redirect macro
authorPeter Palfrader <peter@palfrader.org>
Tue, 22 Jul 2014 19:41:41 +0000 (21:41 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 22 Jul 2014 19:41:41 +0000 (21:41 +0200)
modules/roles/templates/static-mirroring/static-vhost.conf.erb

index 5e3fe41db0fd37ec18383cd078bec745597ab7ae..58cfb1d88444703844d9e6373954eac05565284e 100644 (file)
@@ -1,4 +1,15 @@
 # puppet maintained
+<Macro common-dsa-vhost-https-redirect $name>
+       <VirtualHost <%= vhost_listen %> >
+               ServerName $name
+               ServerAdmin debian-admin@lists.debian.org
+
+               CustomLog /var/log/apache2/$name-access.log privacy
+               ErrorLog /var/log/apache2/$name-error.log
+
+               Redirect permanent / https://$name/
+       </VirtualHost>
+</Macro>
 
 <Macro common-static-base $name>
        <IfModule mod_userdir.c>
 
 
 <Macro common-static-vhost-ssl $name>
-       <VirtualHost <%= vhost_listen %> >
-               ServerName $name
-               ServerAdmin debian-admin@lists.debian.org
-
-               CustomLog /var/log/apache2/$name-access.log privacy
-               ErrorLog /var/log/apache2/$name-error.log
-
-               Redirect permanent / https://$name/
-       </VirtualHost>
+       Use common-dsa-vhost-https-redirect $name
 
        <Virtualhost <%= vhost_listen_443 %> >
                ServerName $name