# puppet maintained
-Use common-static-vhost mozilla.debian.net
-Use common-static-vhost backports.debian.org
-Use common-static-vhost-publiclog bits.debian.org
-Use common-static-vhost news.debian.net
-Use common-static-vhost-with-extra ftp-master.metadata.debian.org "AddDefaultCharset utf-8"
-Use common-static-vhost-with-extra d-i.debian.org "ServerAlias d-i-backend.debian.org"
-Use common-static-vhost-with-extra network-test.debian.org "ServerAlias network-test-backend.debian.org"
-Use common-static-vhost-with-extra blends.debian.org "ServerAlias blends-backend.debian.org"
-Use common-static-vhost-with-extra wnpp-by-tags.debian.net "ServerAlias wnpp-by-tags-backend.debian.org"
-Use common-static-vhost-ssl dsa.debian.org
+######################
+# deb.debian.org
+<% if scope.function_has_static_component(['deb.debian.org']) -%>
+<Macro vstatic-vhost-extra-deb.debian.org>
+ ServerAlias httpredir.debian.org
+ ServerAlias cdn.debian.net
+ ServerAlias http.debian.net
+ 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>
+
+<VirtualHost <%= vhost_listen_443 %> >
+ ServerName deb.debian.org
+
+ ErrorLog /var/log/apache2/deb.debian.org-error.log
+ CustomLog /var/log/apache2/deb.debian.org-access.log privacyssl
+
+ Use common-debian-service-ssl deb.debian.org
+ Use common-ssl-HSTS
+
+ ServerAdmin debian-admin@lists.debian.org
+ <IfModule mod_userdir.c>
+ UserDir disabled
+ </IfModule>
+ ServerSignature On
+
+ DocumentRoot /srv/static.debian.org/mirrors/deb.debian.org/cur
+ <Directory /srv/static.debian.org/mirrors/deb.debian.org/cur>
+ AllowOverride FileInfo Indexes Options=Multiviews
+ Options Indexes SymLinksIfOwnerMatch
+ Require all granted
+ </Directory>
+
+ Header set Surrogate-Key <%= hostname %>
+
+ AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
+
+ Redirect /debian/ https://cdn-aws.deb.debian.org/debian/
+ Redirect /debian-debug/ https://cdn-aws.deb.debian.org/debian-debug/
+ Redirect /debian-ports/ https://cdn-aws.deb.debian.org/debian-ports/
+ Redirect /debian-security/ https://cdn-aws.deb.debian.org/debian-security/
+</VirtualHost>
+<% end -%>
+
+<Macro vstatic-vhost-extra-network-test.debian.org>
+ ServerAlias network-test-backend.debian.org
+</Macro>
+
+<Macro vstatic-vhost-extra-bits.debian.org>
+ <IfModule mod_geoip.c>
+ CustomLog /var/log/apache2/bits.debian.org-public-access.log privacy+geo
+ </IfModule>
+</Macro>
+
+<Macro vstatic-vhost-extra-metadata.ftp-master.debian.org>
+ AddDefaultCharset utf-8
+
+ # Rewrite away double slashes
+ RewriteEngine on
+ RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ [NC]
+ RewriteRule . %1/%2 [R=301,L,NE]
+
+ <LocationMatch "/changelogs/(main|contrib|non-free)">
+ ForceType text/plain
+ </LocationMatch>
+</Macro>
+
+<Macro vstatic-vhost-extra-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 MultiViews
+
+ AddEncoding gzip .gz
+ FilterDeclare gzip CONTENT_SET
+ FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
+ FilterChain gzip
+ <Files *.debdiff.gz>
+ ForceType text/plain
+ AddDefaultCharset utf-8
+ </Files>
+ <Files *.debdiff.html.gz>
+ ForceType text/html
+ AddDefaultCharset utf-8
+ </Files>
+ </Directory>
+</Macro>
+
+<Macro vstatic-vhost-extra-www.ports.debian.org>
+ <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
+ AllowOverride FileInfo Indexes Options=Multiviews
+ Options Multiviews Indexes FollowSymLinks Includes
+ Require all granted
+ </Directory>
+
+ AddOutputFilter INCLUDES .xhtml
+</Macro>
+
+
+<Macro vstatic-vhost-extra-lintian.debian.org>
+ AddDefaultCharset utf-8
+
+ <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
+ Require all granted
+
+ # These three lines makes apache serve
+ # "lintian.log.gz" as a text/plain with encoding gzip
+ # making it easier to view the log in the browser.
+ RemoveType .gz
+ AddEncoding x-gzip .gz
+ AddType text/plain .log
+
+ <IfModule mod_userdir.c>
+ AddOutputFilterByType DEFLATE image/svg+xml
+ AddOutputFilterByType DEFLATE text/plain
+ </IfModule>
+ </Directory>
+
+ <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
+ # Cache these for a year (3600 * 24 * 365.25)
+ # Files in here will change name if their content change
+ Header set Cache-Control "max-age=31557600, public"
+ </Directory>
+
+ RewriteEngine on
+ RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
+
+ # Re-direct from the "old" locations to the new ones
+ RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
+ RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
+
+ # Map source packages to reports (this mapping is re-written once per lintian run,
+ # serve it as a 302 rather than a permanent redirect)
+ # Version-less request
+ RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
+ # Versioned request
+ RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]
+</Macro>
+
+<%=
+
+def vhost(lines, sn, kwargs={})
+ if scope.function_has_static_component([sn])
+ if not kwargs[:extra]
+ lines << "<Macro vstatic-vhost-extra-#{sn}>"
+ lines << " # mod macro does not like empty macros, so here's some content:"
+ lines << " <Directory /non-existant>"
+ lines << " </Directory>"
+ lines << "</Macro>"
+ end
+
+ lines << "Use prepare-static-vhost #{sn}"
+
+ if kwargs[:ssl] and kwargs[:ssl_optional]
+ lines << "Use static-vhost-plain-#{sn}"
+ lines << "Use static-vhost-ssl-#{sn}"
+ elsif kwargs[:ssl]
+ lines << "Use common-dsa-vhost-https-redirect #{sn}"
+ lines << "Use static-vhost-ssl-#{sn}"
+ else
+ lines << "Use static-vhost-plain-#{sn}"
+ end
+
+ onion = scope.function_onion_global_service_hostname([sn])
+ lines << "Use static-vhost-onion-#{sn} #{onion}" if onion
+
+ lines << ""
+ end
+end
+
+lines = []
+vhost(lines, "mozilla.debian.net" , :ssl => true, :ssl_optional => true)
+vhost(lines, "backports.debian.org" , :ssl => true)
+vhost(lines, "incoming.debian.org" , :ssl => true, :ssl_optional => true)
+vhost(lines, "incoming.ports.debian.org" , :ssl => true, :ssl_optional => true)
+vhost(lines, "debdeltas.debian.net" , :ssl => true, :ssl_optional => true)
+vhost(lines, "news.debian.net" , :ssl => true)
+vhost(lines, "bootstrap.debian.net" , :ssl => true)
+vhost(lines, "debaday.debian.net" , :ssl => true)
+vhost(lines, "timeline.debian.net" , :ssl => true)
+vhost(lines, "network-test.debian.org" , :extra => true)
+vhost(lines, "blends.debian.org" , :ssl => true)
+vhost(lines, "wnpp-by-tags.debian.net" , :ssl => true)
+vhost(lines, "security-team.debian.org" , :ssl => true)
+vhost(lines, "d-i.debian.org" , :ssl => true)
+vhost(lines, "appstream.debian.org" , :ssl => true)
+vhost(lines, "apt.buildd.debian.org" , :ssl => true)
+vhost(lines, "dsa.debian.org" , :ssl => true)
+vhost(lines, "rtc.debian.org" , :ssl => true)
+vhost(lines, "mirror-master.debian.org" , :ssl => true)
+vhost(lines, "onion.debian.org" , :ssl => true)
+vhost(lines, "manpages.debian.org" , :ssl => true, :extra => true)
+
+vhost(lines, "bits.debian.org" , :ssl => true, :extra => true)
+vhost(lines, "micronews.debian.org" , :ssl => true)
+vhost(lines, "metadata.ftp-master.debian.org", :extra => true)
+
+vhost(lines, "10years.debconf.org" , :ssl => true)
+vhost(lines, "debconf0.debconf.org" , :ssl => true)
+vhost(lines, "debconf1.debconf.org" , :ssl => true)
+vhost(lines, "debconf2.debconf.org" , :ssl => true)
+vhost(lines, "debconf3.debconf.org" , :ssl => true)
+vhost(lines, "debconf4.debconf.org" , :ssl => true)
+vhost(lines, "debconf5.debconf.org" , :ssl => true)
+vhost(lines, "debconf6.debconf.org" , :ssl => true)
+vhost(lines, "debconf7.debconf.org" , :ssl => true)
+vhost(lines, "debconf16.debconf.org" , :ssl => true)
+vhost(lines, "es.debconf.org" , :ssl => true)
+vhost(lines, "fr.debconf.org" , :ssl => true)
+vhost(lines, "miniconf10.debconf.org" , :ssl => true)
+
+vhost(lines, "deb.debian.org" , :extra => true)
+vhost(lines, "release.debian.org" , :ssl => true, :extra => true)
+vhost(lines, "www.ports.debian.org" , :ssl => true, :extra => true)
+vhost(lines, "lintian.debian.org" , :ssl => true, :extra => true)
+
+lines.join("\n")
+-%>
+
+# www.backports.org
+###################
# www.backports.org is the historical place for the backports
# website and archive. It is now a CNAME to backports.debian.org:
# redirect http requests.
ServerName www.backports.org
ServerAlias lists.backports.org
ServerAdmin debian-admin@debian.org
- RedirectPermanent /debian/ http://backports.debian.org/debian-backports/
- RedirectPermanent /backports.org/ http://backports.debian.org/debian-backports/
- RedirectPermanent /debian-backports/ http://backports.debian.org/debian-backports/
RedirectPermanent / http://backports.debian.org/
</VirtualHost>
+######################
+<VirtualHost <%= vhost_listen %> >
+ ServerName www.debian-ports.org
+ ServerAlias debian-ports.org
+ ServerAdmin debian-admin@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 ftp.debian-ports.org
+ ServerAdmin debian-admin@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>
+
+<VirtualHost <%= vhost_listen %> >
+ ServerName video.debian.net
+ ServerAdmin debian-admin@debian.org
+ Redirect / http://meetings-archive.debian.net/pub/debian-meetings/
+</VirtualHost>
+# historical sites
+##################
+# now only redirects remain
<VirtualHost <%= vhost_listen %> >
ServerName women.debian.org
ServerAdmin debian-admin@debian.org
RedirectPermanent /profiles/ http://www.debian.org/women/profiles/
</VirtualHost>
-# debian ports stuff
-####################
-<Virtualhost <%= vhost_listen %> >
- ServerName www.ports.debian.org
- ServerAlias www.ports-backend.debian.org
- ServerAdmin debian-admin@lists.debian.org
-
- ErrorLog /var/log/apache2/www.ports.debian.org-error.log
- CustomLog /var/log/apache2/www.ports.debian.org-access.log privacy
-
- <IfModule mod_userdir.c>
- UserDir disabled
- </IfModule>
- ServerSignature On
-
- DocumentRoot /srv/static.debian.org/mirrors/www.ports.debian.org/cur
- <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
- AllowOverride FileInfo Indexes Options=Multiviews
- Options Multiviews Indexes FollowSymLinks Includes
- IndexOptions FancyIndexing NameWidth=*
- Order allow,deny
- Allow from all
- </Directory>
-
- DefaultType text/plain
- AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
- AddOutputFilter INCLUDES .xhtml
+<VirtualHost <%= vhost_listen %> >
+ ServerName volatile.debian.org
+ ServerAlias volatile-master.debian.org
+ ServerAdmin debian-admin@debian.org
+ RedirectPermanent / http://www.debian.org/volatile/
</VirtualHost>
<VirtualHost <%= vhost_listen %> >
- ServerName www.debian-ports.org
- ServerAlias debian-ports.org
+ ServerName ftp-master.metadata.debian.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 / http://metadata.ftp-master.debian.org/
</VirtualHost>
<VirtualHost <%= vhost_listen %> >
- ServerName ports.debian.net
+ ServerName backports-master.debian.org
ServerAdmin debian-admin@debian.org
- RedirectPermanent / http://www.ports.debian.org/
+ RedirectPermanent / https://backports.debian.org/
</VirtualHost>
# vim:ft=apache: