# 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>
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>
<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