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
105 <Macro vstatic-vhost-extra-www.ports.debian.org>
106 <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
107 AllowOverride FileInfo Indexes Options=Multiviews
108 Options Multiviews Indexes FollowSymLinks Includes
112 AddOutputFilter INCLUDES .xhtml
116 <Macro vstatic-vhost-extra-lintian.debian.org>
117 AddDefaultCharset utf-8
119 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
122 # These three lines makes apache serve
123 # "lintian.log.gz" as a text/plain with encoding gzip
124 # making it easier to view the log in the browser.
126 AddEncoding x-gzip .gz
127 AddType text/plain .log
129 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css image/svg+xml
132 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
133 # Cache these for a year (3600 * 24 * 365.25)
134 # Files in here will change name if their content change
135 Header set Cache-Control "max-age=31557600, public"
139 RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
141 # Re-direct from the "old" locations to the new ones
142 RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
143 RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
145 # Map source packages to reports (this mapping is re-written once per lintian run,
146 # serve it as a 302 rather than a permanent redirect)
147 # Version-less request
148 RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
150 RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]
152 Header always set Content-Security-Policy "default-src 'self'; media-src 'none'; object-src 'none';"
153 <FilesMatch "\.(svg)$">
154 Header always set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline';"
158 <Macro vstatic-vhost-extra-wiki.debconf.org>
167 RewriteRule ^/$ /wiki/Main_Page [L,R=permanent]
168 RewriteRule ^/wiki/$ /wiki/Main_Page [L,R=permanent]
170 RewriteCond %{QUERY_STRING} (^|&)modules=mediawiki.legacy.commonPrint,shared|skins.monobook(&|$)
171 RewriteCond %{QUERY_STRING} (^|&)only=styles(&|$)
172 RewriteRule ^/load.php$ /load-monobook-styles.css [L,QSD]
174 RewriteCond %{QUERY_STRING} (^|&)modules=site(&|$)
175 RewriteCond %{QUERY_STRING} (^|&)only=styles(&|$)
176 RewriteRule ^/load.php$ /load-site-styles.css [L,QSD]
178 RewriteCond %{QUERY_STRING} (^|&)modules=startup(&|$)
179 RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$)
180 RewriteRule ^/load.php$ /load-startup-scripts.js [L,QSD]
182 RewriteCond %{QUERY_STRING} (^|&)modules=site(&|$)
183 RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$)
184 RewriteRule ^/load.php$ /load-site-scripts.js [L,QSD]
186 RewriteCond %{QUERY_STRING} (^|&)modules=jquery%2Cmediawiki(&|$)
187 RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$)
188 RewriteRule ^/load.php$ /load-jquery-scripts.js [L,QSD]
190 RewriteCond %{QUERY_STRING} (^|&)modules=jquery.client%2Ccookie%2CmessageBox%2CmwExtension|mediawiki.legacy.ajax%2Cwikibits|mediawiki.page.startup|mediawiki.util(&|$)
191 RewriteRule ^/load.php$ /load-jquery.client.js [L,QSD]
193 RewriteCond %{QUERY_STRING} (^|&)modules=jquery.checkboxShiftClick%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%7Cmediawiki.page.ready%7Cmediawiki.user(&|$)
194 RewriteRule ^/load.php$ /load-jquery.checkbox.js [L,QSD]
197 <Macro vstatic-vhost-extra-www.debconf.org>
198 ServerAlias www-test.debconf.org
200 <Directory /srv/static.debian.org/mirrors/www.debconf.org/cur>
204 AddOutputFilter INCLUDES .shtml
209 def vhost(lines, sn, kwargs={})
210 if scope.function_has_static_component([sn])
211 if not kwargs[:extra]
212 lines << "<Macro vstatic-vhost-extra-#{sn}>"
213 lines << " # mod macro does not like empty macros, so here's some content:"
214 lines << " <Directory /non-existant>"
215 lines << " </Directory>"
219 lines << "Use prepare-static-vhost #{sn}"
221 if kwargs[:ssl] and kwargs[:ssl_optional]
222 lines << "Use static-vhost-plain-#{sn}"
223 lines << "Use static-vhost-ssl-#{sn}"
225 lines << "Use common-dsa-vhost-https-redirect #{sn}"
226 lines << "Use static-vhost-ssl-#{sn}"
228 lines << "Use static-vhost-plain-#{sn}"
231 onion = scope.function_onion_global_service_hostname([sn])
232 lines << "Use static-vhost-onion-#{sn} #{onion}" if onion
239 vhost(lines, "mozilla.debian.net" , :ssl => true, :ssl_optional => true)
240 vhost(lines, "backports.debian.org" , :ssl => true)
241 vhost(lines, "incoming.debian.org" , :ssl => true, :ssl_optional => true)
242 vhost(lines, "incoming.ports.debian.org" , :ssl => true, :ssl_optional => true)
243 vhost(lines, "debdeltas.debian.net" , :ssl => true, :ssl_optional => true)
244 vhost(lines, "news.debian.net" , :ssl => true)
245 vhost(lines, "bootstrap.debian.net" , :ssl => true)
246 vhost(lines, "debaday.debian.net" , :ssl => true)
247 vhost(lines, "timeline.debian.net" , :ssl => true)
248 vhost(lines, "network-test.debian.org" , :extra => true)
249 vhost(lines, "blends.debian.org" , :ssl => true)
250 vhost(lines, "wnpp-by-tags.debian.net" , :ssl => true)
251 vhost(lines, "security-team.debian.org" , :ssl => true)
252 vhost(lines, "d-i.debian.org" , :ssl => true)
253 vhost(lines, "appstream.debian.org" , :ssl => true)
254 vhost(lines, "apt.buildd.debian.org" , :ssl => true)
255 vhost(lines, "dpl.debian.org" , :ssl => true)
256 vhost(lines, "dsa.debian.org" , :ssl => true)
257 vhost(lines, "rtc.debian.org" , :ssl => true)
258 vhost(lines, "mirror-master.debian.org" , :ssl => true)
259 vhost(lines, "onion.debian.org" , :ssl => true)
260 vhost(lines, "manpages.debian.org" , :ssl => true, :extra => true)
261 vhost(lines, "cdbuilder-logs.debian.org" , :ssl => true)
263 vhost(lines, "bits.debian.org" , :ssl => true, :extra => true)
264 vhost(lines, "micronews.debian.org" , :ssl => true)
265 vhost(lines, "metadata.ftp-master.debian.org", :extra => true)
267 vhost(lines, "10years.debconf.org" , :ssl => true)
268 vhost(lines, "debconf0.debconf.org" , :ssl => true)
269 vhost(lines, "debconf1.debconf.org" , :ssl => true)
270 vhost(lines, "debconf2.debconf.org" , :ssl => true)
271 vhost(lines, "debconf3.debconf.org" , :ssl => true)
272 vhost(lines, "debconf4.debconf.org" , :ssl => true)
273 vhost(lines, "debconf5.debconf.org" , :ssl => true)
274 vhost(lines, "debconf6.debconf.org" , :ssl => true)
275 vhost(lines, "debconf7.debconf.org" , :ssl => true)
276 vhost(lines, "debconf16.debconf.org" , :ssl => true)
277 vhost(lines, "debconf17.debconf.org" , :ssl => true)
278 vhost(lines, "debconf18.debconf.org" , :ssl => true)
279 vhost(lines, "debconf19.debconf.org" , :ssl => true)
280 vhost(lines, "es.debconf.org" , :ssl => true)
281 vhost(lines, "fr.debconf.org" , :ssl => true)
282 vhost(lines, "miniconf10.debconf.org" , :ssl => true)
283 vhost(lines, "wiki.debconf.org" , :ssl => true, :extra => true)
285 vhost(lines, "deb.debian.org" , :extra => true)
286 vhost(lines, "release.debian.org" , :ssl => true, :extra => true)
287 vhost(lines, "www.ports.debian.org" , :ssl => true, :extra => true)
288 vhost(lines, "lintian.debian.org" , :ssl => true, :extra => true)
295 # www.backports.org is the historical place for the backports
296 # website and archive. It is now a CNAME to backports.debian.org:
297 # redirect http requests.
298 <VirtualHost <%= @vhost_listen %> >
299 ServerName www.backports.org
300 ServerAlias lists.backports.org
301 ServerAdmin debian-admin@debian.org
302 RedirectPermanent / https://backports.debian.org/
305 ######################
306 <VirtualHost <%= @vhost_listen %> >
307 ServerName www.debian-ports.org
308 ServerAlias debian-ports.org
309 ServerAdmin debian-admin@debian.org
310 RedirectPermanent / https://www.ports.debian.org/
313 <VirtualHost <%= @vhost_listen %> >
314 ServerName ports.debian.org
315 ServerAlias ports.debian.net
316 ServerAdmin debian-admin@debian.org
317 RedirectPermanent / https://www.ports.debian.org/
320 <VirtualHost <%= @vhost_listen %> >
321 ServerName incoming.debian-ports.org
322 ServerAdmin debian-admin@debian.org
323 RedirectPermanent / http://incoming.ports.debian.org/
326 <VirtualHost <%= @vhost_listen %> >
327 ServerName ftp.debian-ports.org
328 ServerAdmin debian-admin@debian.org
329 RedirectPermanent /archive https://www.ports.debian.org
330 RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
331 RedirectPermanent /debian-cd https://cdimage.debian.org/cdimage/ports/
332 RedirectPermanent / http://ftp.ports.debian.org/
335 <Macro vstatic-vhost-video.debian.net>
336 ServerName video.debian.net
337 ServerAdmin debian-admin@debian.org
338 Redirect / https://meetings-archive.debian.net/pub/debian-meetings/
341 <VirtualHost <%= @vhost_listen %> >
342 Use vstatic-vhost-video.debian.net
345 <VirtualHost <%= @vhost_listen_443 %> >
346 Use vstatic-vhost-video.debian.net
347 Use common-debian-service-ssl video.debian.net
351 Use common-dsa-vhost-https-redirect lists.alioth.debian.org
352 <VirtualHost <%= @vhost_listen_443 %> >
353 ServerName lists.alioth.debian.org
354 ServerAdmin debian-admin@debian.org
355 Use common-debian-service-ssl lists.alioth.debian.org
357 Redirect / https://alioth-lists.debian.net/
360 Use common-dsa-vhost-https-redirect pkg-ruby-extras.alioth.debian.org
361 <VirtualHost <%= @vhost_listen_443 %> >
362 ServerName pkg-ruby-extras.alioth.debian.org
363 ServerAdmin debian-admin@debian.org
364 Use common-debian-service-ssl pkg-ruby-extras.alioth.debian.org
366 Redirect / https://gemwatch.debian.net/
369 Use common-dsa-vhost-https-redirect video.debconf.org
370 <VirtualHost <%= @vhost_listen_443 %> >
371 ServerName video.debconf.org
372 ServerAdmin debian-admin@debian.org
373 Use common-debian-service-ssl video.debconf.org
375 Redirect / https://debconf-video-team.pages.debian.net/docs/
378 <% if scope.function_has_static_component(['metadata.ftp-master.debian.org']) -%>
379 <VirtualHost <%= @vhost_listen_443 %> >
380 ServerName metadata.ftp-master.debian.org
381 ServerAlias metadata-backend.ftp-master.debian.org
382 # all self-referential URLs should use the public host name
384 Use common-debian-service-ssl metadata-backend.ftp-master.debian.org
385 ErrorLog /var/log/apache2/metadata-backend.ftp-master.debian.org-error.log
386 CustomLog /var/log/apache2/metadata-backend.ftp-master.debian.org-access.log privacy
388 Use static-vhost-base-metadata.ftp-master.debian.org
394 # now only redirects remain
395 <VirtualHost <%= @vhost_listen %> >
396 ServerName women.debian.org
397 ServerAdmin debian-admin@debian.org
399 RedirectPermanent / https://www.debian.org/women/
401 RedirectPermanent /about/ https://www.debian.org/women/about
402 RedirectPermanent /contact/ https://www.debian.org/women/contact
403 RedirectPermanent /faqs/ https://www.debian.org/women/faq
404 RedirectPermanent /home/ https://www.debian.org/women/
405 RedirectPermanent /images/dw.png https://www.debian.org/women/dw.png
406 RedirectPermanent /involvement/ https://www.debian.org/women/participate
407 RedirectPermanent /mentoring/ https://www.debian.org/women/mentoring
408 RedirectPermanent /press/ https://wiki.debian.org/DebianWomen/Press
409 RedirectPermanent /profiles/ https://www.debian.org/women/profiles/
412 <VirtualHost <%= @vhost_listen %> >
413 ServerName volatile.debian.org
414 ServerAlias volatile-master.debian.org
415 ServerAdmin debian-admin@debian.org
416 RedirectPermanent / https://www.debian.org/volatile/
419 <VirtualHost <%= @vhost_listen %> >
420 ServerName ftp-master.metadata.debian.org
421 ServerAdmin debian-admin@debian.org
422 RedirectPermanent / http://metadata.ftp-master.debian.org/
425 <VirtualHost <%= @vhost_listen %> >
426 ServerName backports-master.debian.org
427 ServerAdmin debian-admin@debian.org
428 RedirectPermanent / https://backports.debian.org/
431 <VirtualHost <%= @vhost_listen %> >
432 ServerName manpages.debian.net
433 ServerAdmin debian-admin@debian.org
434 Redirect / https://manpages.debian.org/
437 Use common-dsa-vhost-https-redirect sources.debian.net
438 <VirtualHost <%= @vhost_listen_443 %> >
439 ServerName sources.debian.net
440 ServerAdmin debian-admin@debian.org
441 Use common-debian-service-ssl sources.debian.net
443 Redirect permanent / https://sources.debian.org/
449 Use common-dsa-vhost-https-redirect archive.debian.net
450 <VirtualHost <%= @vhost_listen_443 %> >
451 ServerName archive.debian.net
452 ServerAdmin debian-admin@debian.org
453 ErrorLog /var/log/apache2/archive.debian.net-error.log
454 CustomLog /var/log/apache2/archive.debian.net-access.log privacyssl
455 Use common-debian-service-ssl archive.debian.net
457 Use common-disabled-service
460 <VirtualHost <%= @vhost_listen %> >
461 ServerName cdimage.debian.org
462 ServerAlias cloud.debian.org
463 ServerAlias get.debian.org
464 ServerAlias bttracker.debian.org
465 ServerAlias meetings-archive.debian.net
466 ServerAdmin debian-admin@debian.org
467 ErrorLog /var/log/apache2/cdimage.debian.org-error.log
468 CustomLog /var/log/apache2/cdimage.debian.org-access.log privacyssl
470 <IfModule mod_userdir.c>
473 DocumentRoot /srv/static.debian.org/puppet/cdimage.debian.org
474 <Directory /srv/static.debian.org/puppet/cdimage.debian.org>
478 RewriteRule !^/503.html / [R=503]
479 ErrorDocument 503 /503.html
482 <VirtualHost <%= @vhost_listen_443 %> >
483 ServerName cdimage.debian.org
484 ServerAlias cloud.debian.org
485 ServerAlias get.debian.org
486 ServerAlias bttracker.debian.org
487 ServerAlias meetings-archive.debian.net
488 ServerAdmin debian-admin@debian.org
489 ErrorLog /var/log/apache2/cdimage.debian.org-error.log
490 CustomLog /var/log/apache2/cdimage.debian.org-access.log privacyssl
491 Use common-debian-service-ssl cdimage.debian.org
493 <IfModule mod_userdir.c>
496 DocumentRoot /srv/static.debian.org/puppet/cdimage.debian.org
497 <Directory /srv/static.debian.org/puppet/cdimage.debian.org>
501 RewriteRule !^/503.html / [R=503]
502 ErrorDocument 503 /503.html