5 <% if scope.function_has_static_component(['deb.debian.org']) -%>
6 <Macro vstatic-vhost-extra-deb.debian.org>
7 ServerAlias httpredir.debian.org
8 ServerAlias cdn.debian.net
9 ServerAlias http.debian.net
11 Redirect /debian http://cdn-fastly.deb.debian.org/debian
12 Redirect /debian-debug http://cdn-fastly.deb.debian.org/debian-debug
13 Redirect /debian-ports http://cdn-fastly.deb.debian.org/debian-ports
14 Redirect /debian-security http://cdn-fastly.deb.debian.org/debian-security
17 <VirtualHost <%= @vhost_listen_443 %> >
18 ServerName deb.debian.org
20 ErrorLog /var/log/apache2/deb.debian.org-error.log
21 CustomLog /var/log/apache2/deb.debian.org-access.log privacyssl
23 Use common-debian-service-ssl deb.debian.org
26 ServerAdmin debian-admin@lists.debian.org
27 <IfModule mod_userdir.c>
32 DocumentRoot /srv/static.debian.org/mirrors/deb.debian.org/cur
33 <Directory /srv/static.debian.org/mirrors/deb.debian.org/cur>
34 AllowOverride FileInfo Indexes Options=Multiviews
35 Options Indexes SymLinksIfOwnerMatch
39 Header set Surrogate-Key <%= @hostname %>
41 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
43 Redirect /debian https://cdn-aws.deb.debian.org/debian
44 Redirect /debian-debug https://cdn-aws.deb.debian.org/debian-debug
45 Redirect /debian-ports https://cdn-aws.deb.debian.org/debian-ports
46 Redirect /debian-security https://cdn-aws.deb.debian.org/debian-security
50 <Macro vstatic-vhost-extra-network-test.debian.org>
51 ServerAlias network-test-backend.debian.org
53 Header set Cache-Control "must-revalidate, max-age=0"
57 <Macro vstatic-vhost-extra-bits.debian.org>
58 <IfModule mod_geoip.c>
59 CustomLog /var/log/apache2/bits.debian.org-public-access.log privacy+geo
63 <Macro vstatic-vhost-extra-metadata.ftp-master.debian.org>
64 AddDefaultCharset utf-8
66 # Rewrite away double slashes
68 RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ [NC]
69 RewriteRule . %1/%2 [R=301,L,NE]
71 <LocationMatch "/changelogs/(main|contrib|non-free)">
76 <Macro vstatic-vhost-extra-release.debian.org>
78 RewriteRule ^/migration/$ /migration/testing.pl
79 RewriteRule ^/migration/search/(.+)/$ /migration/testing.pl?package=$1
80 RewriteCond %{QUERY_STRING} package=((.)(.*))
81 RewriteRule ^/migration/testing.pl /migration/cache/%2/%1.html [PT,L]
82 RewriteRule ^/migration/testing.pl /migration/cache/_index.html
84 Alias /oldstable-proposed-updates/ /srv/static.debian.org/mirrors/release.debian.org-pu/cur/
85 Alias /proposed-updates/ /srv/static.debian.org/mirrors/release.debian.org-pu/cur/
86 <Directory /srv/static.debian.org/mirrors/release.debian.org-pu/cur>
88 Options Indexes SymLinksIfOwnerMatch MultiViews
91 FilterDeclare gzip CONTENT_SET
92 FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
96 AddDefaultCharset utf-8
98 <Files *.debdiff.html.gz>
100 AddDefaultCharset utf-8
102 AddType text/plain .wml
106 <Macro vstatic-vhost-extra-www.ports.debian.org>
107 <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
108 AllowOverride FileInfo Indexes Options=Multiviews
109 Options Multiviews Indexes FollowSymLinks Includes
113 AddOutputFilter INCLUDES .xhtml
117 <Macro vstatic-vhost-extra-lintian.debian.org>
118 AddDefaultCharset utf-8
120 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
123 # These three lines makes apache serve
124 # "lintian.log.gz" as a text/plain with encoding gzip
125 # making it easier to view the log in the browser.
127 AddEncoding x-gzip .gz
128 AddType text/plain .log
130 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css image/svg+xml
133 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
134 # Cache these for a year (3600 * 24 * 365.25)
135 # Files in here will change name if their content change
136 Header set Cache-Control "max-age=31557600, public"
140 RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
142 # Re-direct from the "old" locations to the new ones
143 RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
144 RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
146 # Map source packages to reports (this mapping is re-written once per lintian run,
147 # serve it as a 302 rather than a permanent redirect)
148 # Version-less request
149 RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
151 RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]
153 Header always set Content-Security-Policy "default-src 'self'; media-src 'none'; object-src 'none';"
154 <FilesMatch "\.(svg)$">
155 Header always set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline';"
159 <Macro vstatic-vhost-extra-wiki.debconf.org>
168 RewriteRule ^/$ /wiki/Main_Page [L,R=permanent]
169 RewriteRule ^/wiki/$ /wiki/Main_Page [L,R=permanent]
171 RewriteCond %{QUERY_STRING} (^|&)modules=mediawiki.legacy.commonPrint,shared|skins.monobook(&|$)
172 RewriteCond %{QUERY_STRING} (^|&)only=styles(&|$)
173 RewriteRule ^/load.php$ /load-monobook-styles.css [L,QSD]
175 RewriteCond %{QUERY_STRING} (^|&)modules=site(&|$)
176 RewriteCond %{QUERY_STRING} (^|&)only=styles(&|$)
177 RewriteRule ^/load.php$ /load-site-styles.css [L,QSD]
179 RewriteCond %{QUERY_STRING} (^|&)modules=startup(&|$)
180 RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$)
181 RewriteRule ^/load.php$ /load-startup-scripts.js [L,QSD]
183 RewriteCond %{QUERY_STRING} (^|&)modules=site(&|$)
184 RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$)
185 RewriteRule ^/load.php$ /load-site-scripts.js [L,QSD]
187 RewriteCond %{QUERY_STRING} (^|&)modules=jquery%2Cmediawiki(&|$)
188 RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$)
189 RewriteRule ^/load.php$ /load-jquery-scripts.js [L,QSD]
191 RewriteCond %{QUERY_STRING} (^|&)modules=jquery.client%2Ccookie%2CmessageBox%2CmwExtension|mediawiki.legacy.ajax%2Cwikibits|mediawiki.page.startup|mediawiki.util(&|$)
192 RewriteRule ^/load.php$ /load-jquery.client.js [L,QSD]
194 RewriteCond %{QUERY_STRING} (^|&)modules=jquery.checkboxShiftClick%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%7Cmediawiki.page.ready%7Cmediawiki.user(&|$)
195 RewriteRule ^/load.php$ /load-jquery.checkbox.js [L,QSD]
198 <Macro vstatic-vhost-extra-www.debconf.org>
199 ServerAlias www-test.debconf.org
201 <Directory /srv/static.debian.org/mirrors/www.debconf.org/cur>
202 Options +IncludesNOEXEC
203 SSILegacyExprParser on
204 DirectoryIndex index.shtml
207 AddOutputFilter INCLUDES .shtml
210 # A few redirects for older debconf sites, so old links work
211 RewriteRule ^/gallery/(.*)$ https://gallery.debconf.org/v/$1 [R=permanent,L]
212 RewriteRule ^/.*years$ https://10years.debconf.org/ [R=permanent,L]
213 RewriteRule ^/debconf2$ https://debconf2.debconf.org/ [R=permanent,L]
214 RewriteRule ^/debconf3$ https://debconf3.debconf.org/ [R=permanent,L]
215 RewriteRule ^/debconf4$ https://debconf4.debconf.org/ [R=permanent,L]
216 RewriteRule ^/debconf5$ https://debconf5.debconf.org/ [R=permanent,L]
217 RewriteRule ^/10years/(.*)$ https://10years.debconf.org/$1 [R=permanent,L]
218 RewriteRule ^/debconf2/(.*)$ https://debconf2.debconf.org/$1 [R=permanent,L]
219 RewriteRule ^/debconf3/(.*)$ https://debconf3.debconf.org/$1 [R=permanent,L]
220 RewriteRule ^/debconf4/(.*)$ https://debconf4.debconf.org/$1 [R=permanent,L]
221 RewriteRule ^/debconf5/(.*)$ https://debconf5.debconf.org/$1 [R=permanent,L]
224 <Macro vstatic-vhost-extra-openpgpkey.debian.org>
225 Alias /.well-known/openpgpkey/ /srv/static.debian.org/mirrors/openpgpkey.debian.org/cur/
234 def vhost(lines, sn, kwargs={})
235 if scope.function_has_static_component([sn])
236 if not kwargs[:extra]
237 lines << "<Macro vstatic-vhost-extra-#{sn}>"
238 lines << " # mod macro does not like empty macros, so here's some content:"
239 lines << " <Directory /non-existant>"
240 lines << " </Directory>"
244 lines << "Use prepare-static-vhost #{sn}"
246 if kwargs[:ssl] and kwargs[:ssl_optional]
247 lines << "Use static-vhost-plain-#{sn}"
248 lines << "Use static-vhost-ssl-#{sn}"
250 lines << "Use common-dsa-vhost-https-redirect #{sn}"
251 lines << "Use static-vhost-ssl-#{sn}"
253 lines << "Use static-vhost-plain-#{sn}"
256 onion = scope.function_onion_global_service_hostname([sn])
257 lines << "Use static-vhost-onion-#{sn} #{onion}" if onion
264 vhost(lines, "mozilla.debian.net" , :ssl => true, :ssl_optional => true)
265 vhost(lines, "backports.debian.org" , :ssl => true)
266 vhost(lines, "incoming.debian.org" , :ssl => true, :ssl_optional => true)
267 vhost(lines, "incoming.ports.debian.org" , :ssl => true, :ssl_optional => true)
268 vhost(lines, "debdeltas.debian.net" , :ssl => true, :ssl_optional => true)
269 vhost(lines, "news.debian.net" , :ssl => true)
270 vhost(lines, "bootstrap.debian.net" , :ssl => true)
271 vhost(lines, "debaday.debian.net" , :ssl => true)
272 vhost(lines, "timeline.debian.net" , :ssl => true)
273 vhost(lines, "network-test.debian.org" , :extra => true)
274 vhost(lines, "blends.debian.org" , :ssl => true)
275 vhost(lines, "wnpp-by-tags.debian.net" , :ssl => true)
276 vhost(lines, "security-team.debian.org" , :ssl => true)
277 vhost(lines, "d-i.debian.org" , :ssl => true)
278 vhost(lines, "appstream.debian.org" , :ssl => true)
279 vhost(lines, "dpl.debian.org" , :ssl => true)
280 vhost(lines, "dsa.debian.org" , :ssl => true)
281 vhost(lines, "rtc.debian.org" , :ssl => true)
282 vhost(lines, "mirror-master.debian.org" , :ssl => true)
283 vhost(lines, "onion.debian.org" , :ssl => true)
284 vhost(lines, "openpgpkey.debian.org" , :ssl => true, :extra => true)
285 vhost(lines, "manpages.debian.org" , :ssl => true, :extra => true)
286 vhost(lines, "cdbuilder-logs.debian.org" , :ssl => true)
288 vhost(lines, "bits.debian.org" , :ssl => true, :extra => true)
289 vhost(lines, "micronews.debian.org" , :ssl => true)
290 vhost(lines, "metadata.ftp-master.debian.org", :extra => true)
292 vhost(lines, "10years.debconf.org" , :ssl => true)
293 vhost(lines, "debconf0.debconf.org" , :ssl => true)
294 vhost(lines, "debconf1.debconf.org" , :ssl => true)
295 vhost(lines, "debconf2.debconf.org" , :ssl => true)
296 vhost(lines, "debconf3.debconf.org" , :ssl => true)
297 vhost(lines, "debconf4.debconf.org" , :ssl => true)
298 vhost(lines, "debconf5.debconf.org" , :ssl => true)
299 vhost(lines, "debconf6.debconf.org" , :ssl => true)
300 vhost(lines, "debconf7.debconf.org" , :ssl => true)
301 vhost(lines, "debconf16.debconf.org" , :ssl => true)
302 vhost(lines, "debconf17.debconf.org" , :ssl => true)
303 vhost(lines, "debconf18.debconf.org" , :ssl => true)
304 vhost(lines, "debconf19.debconf.org" , :ssl => true)
305 vhost(lines, "es.debconf.org" , :ssl => true)
306 vhost(lines, "fr.debconf.org" , :ssl => true)
307 vhost(lines, "miniconf10.debconf.org" , :ssl => true)
308 vhost(lines, "wiki.debconf.org" , :ssl => true, :extra => true)
309 vhost(lines, "www.debconf.org" , :ssl => true, :extra => true)
311 vhost(lines, "deb.debian.org" , :extra => true)
312 vhost(lines, "release.debian.org" , :ssl => true, :extra => true)
313 vhost(lines, "www.ports.debian.org" , :ssl => true, :extra => true)
314 vhost(lines, "lintian.debian.org" , :ssl => true, :extra => true)
321 # www.backports.org is the historical place for the backports
322 # website and archive. It is now a CNAME to backports.debian.org:
323 # redirect http requests.
324 <VirtualHost <%= @vhost_listen %> >
325 ServerName www.backports.org
326 ServerAlias lists.backports.org
327 ServerAdmin debian-admin@debian.org
328 RedirectPermanent / https://backports.debian.org/
331 ######################
332 <VirtualHost <%= @vhost_listen %> >
333 ServerName www.debian-ports.org
334 ServerAlias debian-ports.org
335 ServerAdmin debian-admin@debian.org
336 RedirectPermanent / https://www.ports.debian.org/
339 <VirtualHost <%= @vhost_listen %> >
340 ServerName ports.debian.org
341 ServerAlias ports.debian.net
342 ServerAdmin debian-admin@debian.org
343 RedirectPermanent / https://www.ports.debian.org/
346 <VirtualHost <%= @vhost_listen %> >
347 ServerName incoming.debian-ports.org
348 ServerAdmin debian-admin@debian.org
349 RedirectPermanent / http://incoming.ports.debian.org/
352 <VirtualHost <%= @vhost_listen %> >
353 ServerName ftp.debian-ports.org
354 ServerAdmin debian-admin@debian.org
355 RedirectPermanent /archive https://www.ports.debian.org
356 RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
357 RedirectPermanent /debian-cd https://cdimage.debian.org/cdimage/ports/
358 RedirectPermanent / http://ftp.ports.debian.org/
361 <Macro vstatic-vhost-video.debian.net>
362 ServerName video.debian.net
363 ServerAdmin debian-admin@debian.org
364 Redirect / https://meetings-archive.debian.net/pub/debian-meetings/
367 <VirtualHost <%= @vhost_listen %> >
368 Use vstatic-vhost-video.debian.net
371 <VirtualHost <%= @vhost_listen_443 %> >
372 Use vstatic-vhost-video.debian.net
373 Use common-debian-service-ssl video.debian.net
377 Use common-dsa-vhost-https-redirect lists.alioth.debian.org
378 <VirtualHost <%= @vhost_listen_443 %> >
379 ServerName lists.alioth.debian.org
380 ServerAdmin debian-admin@debian.org
381 Use common-debian-service-ssl lists.alioth.debian.org
383 Redirect / https://alioth-lists.debian.net/
386 Use common-dsa-vhost-https-redirect pkg-ruby-extras.alioth.debian.org
387 <VirtualHost <%= @vhost_listen_443 %> >
388 ServerName pkg-ruby-extras.alioth.debian.org
389 ServerAdmin debian-admin@debian.org
390 Use common-debian-service-ssl pkg-ruby-extras.alioth.debian.org
392 Redirect / https://gemwatch.debian.net/
395 Use common-dsa-vhost-https-redirect video.debconf.org
396 <VirtualHost <%= @vhost_listen_443 %> >
397 ServerName video.debconf.org
398 ServerAdmin debian-admin@debian.org
399 Use common-debian-service-ssl video.debconf.org
401 Redirect / https://debconf-video-team.pages.debian.net/docs/
404 <% if scope.function_has_static_component(['metadata.ftp-master.debian.org']) -%>
405 <VirtualHost <%= @vhost_listen_443 %> >
406 ServerName metadata.ftp-master.debian.org
407 ServerAlias metadata-backend.ftp-master.debian.org
408 # all self-referential URLs should use the public host name
410 Use common-debian-service-ssl metadata-backend.ftp-master.debian.org
411 ErrorLog /var/log/apache2/metadata-backend.ftp-master.debian.org-error.log
412 CustomLog /var/log/apache2/metadata-backend.ftp-master.debian.org-access.log privacy
414 Use static-vhost-base-metadata.ftp-master.debian.org
418 Use common-dsa-vhost-https-redirect debconf.org
419 <VirtualHost <%= @vhost_listen_443 %> >
420 ServerName debconf.org
421 ServerAdmin debian-admin@debian.org
422 Use common-debian-service-ssl debconf.org
424 Redirect / https://www.debconf.org/
429 # now only redirects remain
430 <VirtualHost <%= @vhost_listen %> >
431 ServerName women.debian.org
432 ServerAdmin debian-admin@debian.org
434 RedirectPermanent / https://www.debian.org/women/
436 RedirectPermanent /about/ https://www.debian.org/women/about
437 RedirectPermanent /contact/ https://www.debian.org/women/contact
438 RedirectPermanent /faqs/ https://www.debian.org/women/faq
439 RedirectPermanent /home/ https://www.debian.org/women/
440 RedirectPermanent /images/dw.png https://www.debian.org/women/dw.png
441 RedirectPermanent /involvement/ https://www.debian.org/women/participate
442 RedirectPermanent /mentoring/ https://www.debian.org/women/mentoring
443 RedirectPermanent /press/ https://wiki.debian.org/DebianWomen/Press
444 RedirectPermanent /profiles/ https://www.debian.org/women/profiles/
447 <VirtualHost <%= @vhost_listen %> >
448 ServerName volatile.debian.org
449 ServerAlias volatile-master.debian.org
450 ServerAdmin debian-admin@debian.org
451 RedirectPermanent / https://www.debian.org/volatile/
454 <VirtualHost <%= @vhost_listen %> >
455 ServerName ftp-master.metadata.debian.org
456 ServerAdmin debian-admin@debian.org
457 RedirectPermanent / http://metadata.ftp-master.debian.org/
460 <VirtualHost <%= @vhost_listen %> >
461 ServerName backports-master.debian.org
462 ServerAdmin debian-admin@debian.org
463 RedirectPermanent / https://backports.debian.org/
466 <VirtualHost <%= @vhost_listen %> >
467 ServerName manpages.debian.net
468 ServerAdmin debian-admin@debian.org
469 Redirect / https://manpages.debian.org/
472 Use common-dsa-vhost-https-redirect sources.debian.net
473 <VirtualHost <%= @vhost_listen_443 %> >
474 ServerName sources.debian.net
475 ServerAdmin debian-admin@debian.org
476 Use common-debian-service-ssl sources.debian.net
478 Redirect permanent / https://sources.debian.org/
484 Use common-dsa-vhost-https-redirect archive.debian.net
485 <VirtualHost <%= @vhost_listen_443 %> >
486 ServerName archive.debian.net
487 ServerAdmin debian-admin@debian.org
488 ErrorLog /var/log/apache2/archive.debian.net-error.log
489 CustomLog /var/log/apache2/archive.debian.net-access.log privacyssl
490 Use common-debian-service-ssl archive.debian.net
492 Use common-disabled-service
495 <VirtualHost <%= @vhost_listen %> >
496 ServerName cdimage.debian.org
497 ServerAlias cloud.debian.org
498 ServerAlias get.debian.org
499 ServerAlias bttracker.debian.org
500 ServerAlias meetings-archive.debian.net
501 ServerAdmin debian-admin@debian.org
502 ErrorLog /var/log/apache2/cdimage.debian.org-error.log
503 CustomLog /var/log/apache2/cdimage.debian.org-access.log privacyssl
505 <IfModule mod_userdir.c>
508 DocumentRoot /srv/static.debian.org/puppet/cdimage.debian.org
509 <Directory /srv/static.debian.org/puppet/cdimage.debian.org>
513 RewriteRule !^/503.html / [R=503]
514 ErrorDocument 503 /503.html
517 <VirtualHost <%= @vhost_listen_443 %> >
518 ServerName cdimage.debian.org
519 ServerAlias cloud.debian.org
520 ServerAlias get.debian.org
521 ServerAlias bttracker.debian.org
522 ServerAlias meetings-archive.debian.net
523 ServerAdmin debian-admin@debian.org
524 ErrorLog /var/log/apache2/cdimage.debian.org-error.log
525 CustomLog /var/log/apache2/cdimage.debian.org-access.log privacyssl
526 Use common-debian-service-ssl cdimage.debian.org
528 <IfModule mod_userdir.c>
531 DocumentRoot /srv/static.debian.org/puppet/cdimage.debian.org
532 <Directory /srv/static.debian.org/puppet/cdimage.debian.org>
536 RewriteRule !^/503.html / [R=503]
537 ErrorDocument 503 /503.html