redirect https://debian.org/.well-known/openpgpkey/ to openpgpkey.debian.org (re...
[mirror/dsa-puppet.git] / modules / roles / templates / apache-www.debian.org.erb
index ed50778..e0fb2c6 100644 (file)
@@ -97,9 +97,6 @@
    ServerAlias www.debian.eu
    ServerAlias debian.eu
 
-   ServerAlias www.debian.fi
-   ServerAlias debian.fi
-
    ServerAlias www.debian.nl
    ServerAlias debian.nl
 
    RewriteRule ^/(?!devel/website/errors/)(.*/)?404\.(.+)\.html$ /devel/website/errors/404.$2.html [L]
 
 # the joys of backwards compatibility
-   RedirectPermanent /cgi-bin/cvsweb https://cvs.debian.org
    RedirectPermanent /Lists-Archives https://lists.debian.org
    RedirectPermanent /search https://search.debian.org
    RedirectPermanent /Packages https://packages.debian.org
    RedirectPermanent /SPI https://www.spi-inc.org
 #   RedirectPermanent /OpenHardware http://www.openhardware.org
    RedirectPermanent /OpenSource https://opensource.org
+   RedirectPermanent /misc/bsd.license https://opensource.org/licenses/BSD-3-Clause
 
    RedirectPermanent /Bugs/db/ix/pseudopackages.html /Bugs/pseudo-packages
    RewriteEngine on
    RedirectPermanent /ports/ppc64   /ports/powerpc
    RedirectPermanent /ports/ppc64el   /ports/powerpc
    RedirectPermanent /ports/powerpcspe   /ports/powerpc
+   Redirect /ports/riscv64   https://wiki.debian.org/RISC-V
+   Redirect /ports/x32   https://wiki.debian.org/X32Port
+   Redirect /ports/sh4   https://wiki.debian.org/SH4
    RedirectPermanent /mirror/official_sponsors /mirror/sponsors
    RedirectPermanent /mirror/official /mirror/list
    RedirectPermanent /mirror/mirrors_full.html /mirror/list-full.html
    RewriteCond %{DOCUMENT_ROOT}/doc/manuals/debian-reference/footnotes$1 !-f
    RewriteRule ^/doc/manuals/debian-reference/footnotes(.+)   /doc/manuals/debian-reference/index$1 [L,R=301]
    RewriteRule ^/doc/manuals/debian-reference/footnotes$      /doc/manuals/debian-reference/          [R=301]
+
+# DevRef filename changes c2016
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/scope(\.[a-z]{2})?.html                 $1/ch01$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/new-maintainer(\.[a-z]{2})?.html        $1/ch02$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/developer-duties(\.[a-z]{2})?.html      $1/ch03$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/resources(\.[a-z]{2})?.html             $1/ch04$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/pkgs(\.[a-z]{2})?.html                  $1/ch05$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/best-pkging-practices(\.[a-z]{2})?.html $1/ch06$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/beyond-pkging(\.[a-z]{2})?.html         $1/ch07$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/l10n(\.[a-z]{2})?.html                  $1/ch08$2.html
+   RedirectMatch permanent ^(/doc/manuals/developers-reference)/tools(\.[a-z]{2})?.html                 $1/apa$2.html
+
 # New Maintainers' Guide
    RewriteRule ^/doc/(manuals/)?maint-guide/ch-(.*) /doc/manuals/maint-guide/$2 [R=301]
    RewriteRule ^/doc/(manuals/)?maint-guide/footnotes(.*) /doc/manuals/maint-guide/index$2 [R=301]
 # Relocation of derivatives pages
    RewriteRule ^/misc/children-distros(?:\.html)?$ /derivatives/ [R=301,L]
    RewriteRule ^/misc/children-distros(\.[^\.]+(?:\.html)?)$ /derivatives/index$1 [R=301,L]
+
+# Relocation of memberships information
+   RewriteRule ^/misc/memberships(?:\.html)?$ /intro/organization$1#memberships [R=301,L]
+   RewriteRule ^/misc/memberships(\.[^\.]+(?:\.html)?)$ /intro/organization$1#memberships [R=301,L]
 </Macro>
 
 <Macro common-www.d.o>
-   ServerName www.debian.org
-   ServerAlias www-*.debian.org
+   ServerName <%= @wwwdo_server_name %>
 
    Use common-www.d.o-inner
 </Macro>
    ErrorLog /var/log/apache2/www.debian.org-error.log
    CustomLog /var/log/apache2/www.debian.org-access.log privacy
 
-   ServerName www.debian.org
-   Redirect / https://www.debian.org/
+   ServerName <%= @wwwdo_server_name %>
+   Redirect / https://<%= @wwwdo_server_name %>/
 </VirtualHost>
 <VirtualHost <%= @vhost_listen_443 %> >
    ErrorLog /var/log/apache2/www.debian.org-error.log
 
    Use common-www.d.o
 
-   Use common-debian-service-ssl www.debian.org
+   Use common-debian-service-ssl <%= @wwwdo_server_name %>
    Use common-ssl-HSTS
 </VirtualHost>
-
-<% if scope.function_onion_global_service_hostname(['www.debian.org']) -%>
+<% if scope.function_onion_global_service_hostname([@wwwdo_server_name]) -%>
 <VirtualHost <%= @vhost_listen %> >
    ErrorLog /var/log/apache2/www.debian.org-error.log
    CustomLog /var/log/apache2/www.debian.org-access.log privacy
 
-   ServerName <%= scope.function_onion_global_service_hostname(['www.debian.org']) %>
+   ServerName <%= scope.function_onion_global_service_hostname([@wwwdo_server_name]) %>
 
    Use common-www.d.o-inner
 </VirtualHost>
 <% end %>
 
 
+<%- if @redirect_vhosts -%>
 # www other
 ###########
 <VirtualHost <%= @vhost_listen %> >
    ErrorLog /var/log/apache2/www-other.debian.org-error.log
    CustomLog /var/log/apache2/www-other.debian.org-access.log privacy
 
-   Redirect permanent / https://www.debian.org/
+   Redirect / https://www.debian.org/
 </VirtualHost>
 <VirtualHost <%= @vhost_listen_443 %> >
    Use common-www-other.d.o
    CustomLog /var/log/apache2/www-other-access.log privacyssl
    ErrorLog /var/log/apache2/www-other-error.log
 
-   Redirect permanent / https://www.debian.org/
+   # Legacy GPG versions (including 2.2.12 in buster/Debian 10) use the "direct method" instead
+   # of the "advanced method" which should be tried first according to the draft
+   # https://tools.ietf.org/html/draft-koch-openpgp-webkey-service
+   # also cf. RT#7828
+   Redirect /.well-known/openpgpkey/ https://openpgpkey.debian.org/.well-known/openpgpkey/debian.org/
+
+   Redirect / https://www.debian.org/
 
    Use common-debian-service-ssl debian.org
    Use common-ssl-HSTS
 </VirtualHost>
+<%- end -%>
 # vim:set syn=apache: