Use the leap-seconds.list file from tzdata on jessie (see #775166)
[mirror/dsa-puppet.git] / modules / roles / templates / static-mirroring / static-vhost.conf.erb
index 5e3fe41..b265074 100644 (file)
@@ -1,4 +1,27 @@
 # 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-dsa-vhost-https-redirect-temp $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 / https://$name/
+       </VirtualHost>
+</Macro>
 
 <Macro common-static-base $name>
        <IfModule mod_userdir.c>
@@ -14,6 +37,8 @@
                Allow from all
        </Directory>
 
+       Header set Surrogate-Key <%= hostname %>
+
        DefaultType text/plain
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
 </Macro>
 
 
 <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