Add cdn.debian.net server alias to deb.do
[mirror/dsa-puppet.git] / modules / roles / templates / static-mirroring / vhost / planet.debian.org.erb
index 26fbfc1..7d0ab01 100644 (file)
@@ -1,6 +1,11 @@
+<% if scope.function_has_static_component(['planet.debian.org']) -%>
+
 <Virtualhost <%= vhost_listen %> >
        ServerName planet.debian.org
-       ServerAlias planet.debian.net planeta.debian.net planet-backend.debian.org
+       ServerAlias planet.debian.net planeta.debian.net planet-backend.debian.org planet-fastly.debian.org planet-maxcdn.debian.org
+       <% if scope.function_onion_global_service_hostname(['planet.debian.org']) -%>
+       ServerAlias <%= scope.function_onion_global_service_hostname(['planet.debian.org']) %>
+       <% end %>
        ServerAdmin planet@debian.org
 
        ErrorLog /var/log/apache2/planet.debian.org-error.log
@@ -12,6 +17,9 @@
 
        DocumentRoot /srv/static.debian.org/mirrors/planet.debian.org/cur
        AddDefaultCharset utf-8
+       <Directory /srv/static.debian.org/mirrors/planet.debian.org/cur>
+               Require all granted
+       </Directory>
 
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^planeta.debian.net$ [NC]
@@ -19,4 +27,6 @@
        RewriteCond %{HTTP_HOST} ^planet.debian.net$ [NC]
        RewriteRule ^/(.*)        http://planet.debian.org/$1  [R=permanent,L]
 </VirtualHost>
+<% end -%>
+
 # vim:set syn=apache: