]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/roles/templates/static-mirroring/static-vhost.conf.erb
Add timeline.debian.net to the static CDN
[dsa-puppet.git] / modules / roles / templates / static-mirroring / static-vhost.conf.erb
index 58cfb1d88444703844d9e6373954eac05565284e..6b857fc60a474bc2cacccd4d3f276c843bc1cd7d 100644 (file)
        </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>
                UserDir disabled
        DocumentRoot /srv/static.debian.org/mirrors/$name/cur
        <Directory /srv/static.debian.org/mirrors/$name/cur>
                AllowOverride FileInfo Indexes Options=Multiviews
+               Options Indexes SymLinksIfOwnerMatch
                IndexOptions FancyIndexing NameWidth=*
-               Order allow,deny
-               Allow from all
+               <% if @lsbmajdistrelease > '7' -%>
+                       Require all granted
+               <% else -%>
+                       Order allow,deny
+                       Allow from all
+               <% end -%>
        </Directory>
 
-       DefaultType text/plain
+       Header set Surrogate-Key <%= hostname %>
+
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
 </Macro>