Adjust release.d.o vhost
[mirror/dsa-puppet.git] / modules / roles / templates / static-mirroring / vhost / static-vhosts-simple.erb
index a0f060d..6455c48 100644 (file)
@@ -6,6 +6,7 @@
 <Macro vhost-deb.debian.org-extra>
        Redirect /debian/           http://cdn-fastly.deb.debian.org/debian/
        Redirect /debian-debug/     http://cdn-fastly.deb.debian.org/debian-debug/
+       Redirect /debian-ports/     http://cdn-fastly.deb.debian.org/debian-ports/
        Redirect /debian-security/  http://cdn-fastly.deb.debian.org/debian-security/
 </Macro>
 <% end -%>
@@ -29,14 +30,15 @@ lines = []
 vhost(lines, "mozilla.debian.net")
 vhost(lines, "backports.debian.org", "ssl")
 vhost(lines, "incoming.debian.org")
+vhost(lines, "incoming.ports.debian.org")
 vhost(lines, "debdeltas.debian.net")
 vhost(lines, "news.debian.net"         , "ssl")
 vhost(lines, "debaday.debian.net"      , "ssl")
 vhost(lines, "timeline.debian.net"     , "ssl")
 vhost(lines, "network-test.debian.org" , "with-extra", '"ServerAlias network-test-backend.debian.org"')
-vhost(lines, "blends.debian.org"       , "with-extra", '"ServerAlias blends-backend.debian.org"')
-vhost(lines, "wnpp-by-tags.debian.net" , "with-extra", '"ServerAlias wnpp-by-tags-backend.debian.org"')
-vhost(lines, "security-team.debian.org", "with-extra", '"ServerAlias security-team-backend.debian.org"')
+vhost(lines, "blends.debian.org"       , "ssl")
+vhost(lines, "wnpp-by-tags.debian.net" , "ssl")
+vhost(lines, "security-team.debian.org", "ssl")
 vhost(lines, "d-i.debian.org"      , "ssl")
 vhost(lines, "appstream.debian.org", "ssl")
 vhost(lines, "dsa.debian.org"      , "ssl")
@@ -114,6 +116,46 @@ lines.join("\n")
 </VirtualHost>
 <% end -%>
 
+######################
+# release.debian.org
+<% if scope.function_has_static_component(['release.debian.org']) -%>
+Use common-dsa-vhost-https-redirect release.debian.org
+<VirtualHost <%= vhost_listen_443 %> >
+       ServerName release.debian.org
+       ServerAdmin debian-admin@debian.org
+
+       ErrorLog /var/log/apache2/release.debian.org-error.log
+       CustomLog /var/log/apache2/release.debian.org-access.log privacy
+
+       Use common-debian-service-ssl release.debian.org
+       Use common-ssl-HSTS
+
+       Use common-static-base release.debian.org
+
+       RewriteEngine   on
+       RewriteRule             ^/migration/$                   /migration/testing.pl
+       RewriteRule             ^/migration/search/(.+)/$       /migration/testing.pl?package=$1
+       RewriteCond             %{QUERY_STRING} package=((.)(.*))
+       RewriteRule             ^/migration/testing.pl          /migration/cache/%2/%1.html [PT,L]
+       RewriteRule             ^/migration/testing.pl          /migration/cache/_index.html
+
+       Alias /proposed-updates/ /srv/static.debian.org/mirrors/release.debian.org-pu/cur/
+       <Directory /srv/static.debian.org/mirrors/release.debian.org-pu/cur>
+               Require all granted
+               Options Indexes SymLinksIfOwnerMatch
+               IndexOptions FancyIndexing NameWidth=*
+
+               AddEncoding gzip .gz
+               FilterDeclare gzip CONTENT_SET
+               FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
+               FilterChain gzip
+               <Files *.debdiff.gz>
+                       ForceType text/plain
+               </Files>
+       </Directory>
+</VirtualHost>
+<% end -%>
+
 # www.backports.org
 ###################
 # www.backports.org is the historical place for the backports
@@ -129,7 +171,10 @@ lines.join("\n")
 ######################
 # www.ports.debian.org
 <% if scope.function_has_static_component(['www.ports.debian.org']) -%>
-<Virtualhost <%= vhost_listen %> >
+
+Use common-dsa-vhost-https-redirect www.ports.debian.org
+
+<Virtualhost <%= vhost_listen_443 %> >
        ServerName www.ports.debian.org
        ServerAlias www.ports-backend.debian.org
        ServerAdmin debian-admin@lists.debian.org
@@ -137,6 +182,9 @@ lines.join("\n")
        ErrorLog /var/log/apache2/www.ports.debian.org-error.log
        CustomLog /var/log/apache2/www.ports.debian.org-access.log privacy
 
+       Use common-debian-service-ssl www.ports.debian.org
+       Use common-ssl-HSTS
+
        <IfModule mod_userdir.c>
                UserDir disabled
        </IfModule>
@@ -147,12 +195,7 @@ lines.join("\n")
                AllowOverride FileInfo Indexes Options=Multiviews
                Options Multiviews Indexes FollowSymLinks Includes
                IndexOptions FancyIndexing NameWidth=*
-               <% if @lsbmajdistrelease > '7' -%>
-                       Require all granted
-               <% else -%>
-                       Order allow,deny
-                       Allow from all
-               <% end -%>
+               Require all granted
        </Directory>
 
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
@@ -164,17 +207,29 @@ lines.join("\n")
        ServerName www.debian-ports.org
        ServerAlias debian-ports.org
        ServerAdmin debian-admin@debian.org
-       RedirectPermanent /archive/           http://archive.ports.debian.org/archive/
-       RedirectPermanent /debian-cd/         http://archive.ports.debian.org/debian-cd/
-       RedirectPermanent /debian-snapshot/   http://archive.ports.debian.org/debian-snapshot/
-       RedirectPermanent /debian/            http://archive.ports.debian.org/debian/
-       RedirectPermanent / http://www.ports.debian.org/
+       RedirectPermanent / https://www.ports.debian.org/
+</VirtualHost>
+
+<VirtualHost <%= vhost_listen %> >
+       ServerName ports.debian.org
+       ServerAlias ports.debian.net
+       ServerAdmin debian-admin@debian.org
+       RedirectPermanent / https://www.ports.debian.org/
+</VirtualHost>
+
+<VirtualHost <%= vhost_listen %> >
+       ServerName incoming.debian-ports.org
+       ServerAdmin debian-admin@debian.org
+       RedirectPermanent / http://incoming.ports.debian.org/
 </VirtualHost>
 
 <VirtualHost <%= vhost_listen %> >
-       ServerName ports.debian.net
+       ServerName ftp.debian-ports.org
        ServerAdmin debian-admin@debian.org
-       RedirectPermanent / http://www.ports.debian.org/
+       RedirectPermanent /archive http://www.ports.debian.org
+       RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
+       RedirectPermanent /debian-cd http://ftp.ports.debian.org/debian-ports-cd
+       RedirectPermanent / http://ftp.ports.debian.org/
 </VirtualHost>
 
 # video.debian.net