X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ftemplates%2Fapache-www.debian.org.erb;h=0752086cae1953ff92833674ad36d049360f0047;hb=903e4d6a11f83d89048e1b2870013d27925aef41;hp=8be28f0280d2c52035bd8ee2fd5be83fb7674c79;hpb=1a5a75449b3bccf694a0f70bff7a294f990d9215;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/templates/apache-www.debian.org.erb b/modules/roles/templates/apache-www.debian.org.erb index 8be28f028..0752086ca 100644 --- a/modules/roles/templates/apache-www.debian.org.erb +++ b/modules/roles/templates/apache-www.debian.org.erb @@ -4,16 +4,13 @@ ## # Need to turn on negotiation_module -/> +/> Options +MultiViews +FollowSymLinks +Indexes AddHandler type-map var # Make sure that the srm.conf directive is commented out. AddDefaultCharSet Off AllowOverride AuthConfig FileInfo - <% if @lsbmajdistrelease > '7' -%> - Require all granted - <% end -%> - + Require all granted # Serve icons as image/x-icon AddType image/x-icon .ico @@ -94,25 +91,6 @@ ServerName debian.org ServerAdmin webmaster@debian.org - ServerAlias www.at.debian.org - ServerAlias www.au.debian.org - ServerAlias www.bg.debian.org - ServerAlias www.br.debian.org - ServerAlias www.cn.debian.org - ServerAlias www.de.debian.org - ServerAlias www.es.debian.org - ServerAlias www.fr.debian.org - ServerAlias www.hk.debian.org - ServerAlias www.id.debian.org - ServerAlias www.jp.debian.org - ServerAlias www.nl.debian.org - ServerAlias www.pl.debian.org - ServerAlias www.ru.debian.org - ServerAlias www.ua.debian.org - ServerAlias www.uk.debian.org - ServerAlias www.us.debian.org - ServerAlias www.za.debian.org - ServerAlias www.debian.net ServerAlias debian.net @@ -122,6 +100,9 @@ ServerAlias www.debian.fi ServerAlias debian.fi + ServerAlias www.debian.nl + ServerAlias debian.nl + ServerAlias www.debian.com ServerAlias debian.com @@ -134,23 +115,17 @@ ServerAlias www.debian.es ServerAlias debian.es - ServerAlias www.debian.org.tw - ServerAlias debian.org.tw - ServerAlias www.debian.at - ServerAlias www.debian.de - ServerAlias newwww.deb.at - DocumentRoot <%= wwwdo_document_root %>/ + DocumentRoot <%= @wwwdo_document_root %>/ + LogFormat "0.0.0.0 - %u %{[%d/%b/%Y:00:00:00 %z]}t \"%r\" %>s %b \"%{Referer}i\" \"-\" %V" privacy+host ErrorLog /var/log/apache2/www-other.debian.org-error.log - CustomLog /var/log/apache2/www-other.debian.org-access.log privacy + CustomLog /var/log/apache2/www-other.debian.org-access.log privacy+host - - ServerName www.debian.org + ServerAdmin webmaster@debian.org - ServerAlias www-*.debian.org - DocumentRoot <%= wwwdo_document_root %>/ + DocumentRoot <%= @wwwdo_document_root %>/ # CacheNegotiatedDocs: By default, Apache sends Pragma: no-cache with each # document that was negotiated on the basis of content. This asks proxy @@ -170,9 +145,9 @@ RedirectPermanent /Packages https://packages.debian.org RedirectPermanent /lintian https://lintian.debian.org - RedirectPermanent /SPI http://www.spi-inc.org + RedirectPermanent /SPI https://www.spi-inc.org # RedirectPermanent /OpenHardware http://www.openhardware.org - RedirectPermanent /OpenSource http://www.opensource.org + RedirectPermanent /OpenSource https://opensource.org RedirectPermanent /Bugs/db/ix/pseudopackages.html /Bugs/pseudo-packages RewriteEngine on @@ -211,6 +186,7 @@ RedirectPermanent /ports/armhf /ports/arm RedirectPermanent /ports/arm64 /ports/arm RedirectPermanent /ports/mipsel /ports/mips + RedirectPermanent /ports/mips64el /ports/mips RedirectPermanent /ports/kfreebsd-amd64 /ports/kfreebsd-gnu RedirectPermanent /ports/kfreebsd-i386 /ports/kfreebsd-gnu RedirectPermanent /ports/sparc64 /ports/sparc @@ -218,6 +194,8 @@ RedirectPermanent /ports/ppc64 /ports/powerpc RedirectPermanent /ports/ppc64el /ports/powerpc RedirectPermanent /ports/powerpcspe /ports/powerpc + RedirectPermanent /mirror/official_sponsors /mirror/sponsors + RedirectPermanent /mirror/official /mirror/list RedirectPermanent /mirror/mirrors_full.html /mirror/list-full.html RedirectPermanent /mirrors /mirror RedirectPermanent /News/project /News/weekly @@ -236,22 +214,28 @@ RedirectPermanent /releases/unstable /releases/sid RedirectPermanent /support/ /support +# Upper-case URLs were a bad idea + RedirectPermanent /bugs /Bugs + RedirectPermanent /news /News + RedirectPermanent /mailinglists /MailingLists + RedirectPermanent /cd /CD + RewriteRule ^/ports/freebsd(.*) /ports/kfreebsd-gnu/ [R=301] RewriteRule ^/devel/debian-installer/report-template(.*) /releases/stable/i386/ch05s04.html#submit-bug [NE,R=301] - RewriteRule ^/devel/debian-installer/hooks(.*) http://d-i.alioth.debian.org/doc/internals/apb.html [R=301] - RewriteRule ^/doc/packaging-manuals/mime-policy(.*) /doc/debian-policy/ch-opersys.html#s-mime [NE,R=301] + RewriteRule ^/devel/debian-installer/hooks(.*) https://d-i.alioth.debian.org/doc/internals/apb.html [R=301] + RewriteRule ^/doc/packaging-manuals/mime-policy(.*) /doc/debian-policy/#multimedia-handlers [NE,R=302] RewriteRule ^/volatile/index.* - [S=1] RewriteRule ^/volatile/.+ /volatile/ [L,R=301] RewriteRule ^/devel/debian-volatile/.* /volatile/ [R=301] # Offer a Redirect to DSA without knowing year #474730 - RewriteMap dsa txt:<%= wwwdo_document_root %>/security/map-dsa.txt + RewriteMap dsa txt:<%= @wwwdo_document_root %>/security/map-dsa.txt RewriteRule ^/security/dsa-(\d+)(\..*)? /security/${dsa:$1}$2 [R=301] # Compatibility after SGML -> DocBook # Debian Reference #624239 - RewriteMap reference txt:<%= wwwdo_document_root %>/doc/map-reference.txt + RewriteMap reference txt:<%= @wwwdo_document_root %>/doc/map-reference.txt RewriteCond %{DOCUMENT_ROOT}/doc/manuals/debian-reference/ch-support$1 !-f RewriteRule ^/doc/manuals/debian-reference/ch-support(.*) /support$1 [L,R=301] RewriteCond %{DOCUMENT_ROOT}/doc/manuals/debian-reference/${reference:$1}$2 -f @@ -267,6 +251,12 @@ 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] +# Compatibility after Debian Policy changed to single page manual (bug #877367) + RewriteRule ^/doc/debian-policy/ap-([^/]+).html(.*) /doc/debian-policy/#document-ap-$1 [NE,R=302] + RewriteRule ^/doc/debian-policy/ch-([^/]+).html(.*) /doc/debian-policy/#document-ch-$1 [NE,R=302] + RewriteRule ^/doc/debian-policy/upgrading-checklist.html(.*) /doc/debian-policy/#upgrading-checklist [NE,R=302] + RewriteRule ^/doc/debian-policy/footnotes.html(.*) /doc/debian-policy/ [R=302,L] + # Canonical place for manuals under /doc/manuals/ RewriteCond %{DOCUMENT_ROOT}/doc/manuals/$1 -d RewriteRule ^/doc/([^/]+)/?(.*)? /doc/manuals/$1/$2 [L,R=301] @@ -274,16 +264,28 @@ # Relocation of blends pages RewriteRule ^/devel/hamradio(.*)$ /blends/hamradio$1 [R=301,L] + +# Relocation of derivatives pages + RewriteRule ^/misc/children-distros(?:\.html)?$ /derivatives/ [R=301,L] + RewriteRule ^/misc/children-distros(\.[^\.]+(?:\.html)?)$ /derivatives/index$1 [R=301,L] + + ServerName www.debian.org + ServerAlias www-*.debian.org - > + Use common-www.d.o-inner + + + + > ErrorLog /var/log/apache2/www.debian.org-error.log CustomLog /var/log/apache2/www.debian.org-access.log privacy - Use common-www.d.o + ServerName www.debian.org + Redirect / https://www.debian.org/ - > + > ErrorLog /var/log/apache2/www.debian.org-error.log CustomLog /var/log/apache2/www.debian.org-access.log privacyssl @@ -293,16 +295,29 @@ Use common-ssl-HSTS +<% if scope.function_onion_global_service_hostname(['www.debian.org']) -%> + > + 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']) %> + + Use common-www.d.o-inner + +<% end %> + + +# www other +########### + > Use common-www-other.d.o ErrorLog /var/log/apache2/www-other.debian.org-error.log CustomLog /var/log/apache2/www-other.debian.org-access.log privacy - Redirect permanent / http://www.debian.org/ + Redirect permanent / https://www.debian.org/ - > + > Use common-www-other.d.o CustomLog /var/log/apache2/www-other-access.log privacyssl @@ -310,6 +325,7 @@ Redirect permanent / https://www.debian.org/ - Use common-debian-service-ssl www.debian.org + Use common-debian-service-ssl debian.org Use common-ssl-HSTS +# vim:set syn=apache: