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 <IfModule mod_userdir.c>
130 AddOutputFilterByType DEFLATE image/svg+xml
131 AddOutputFilterByType DEFLATE text/plain
135 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
136 # Cache these for a year (3600 * 24 * 365.25)
137 # Files in here will change name if their content change
138 Header set Cache-Control "max-age=31557600, public"
142 RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
144 # Re-direct from the "old" locations to the new ones
145 RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
146 RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
148 # Map source packages to reports (this mapping is re-written once per lintian run,
149 # serve it as a 302 rather than a permanent redirect)
150 # Version-less request
151 RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
153 RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]
155 Header always set Content-Security-Policy "default-src 'self'; media-src 'none'; object-src 'none';"
156 <FilesMatch "\.(svg)$">
157 Header always set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline';"
163 def vhost(lines, sn, kwargs={})
164 if scope.function_has_static_component([sn])
165 if not kwargs[:extra]
166 lines << "<Macro vstatic-vhost-extra-#{sn}>"
167 lines << " # mod macro does not like empty macros, so here's some content:"
168 lines << " <Directory /non-existant>"
169 lines << " </Directory>"
173 lines << "Use prepare-static-vhost #{sn}"
175 if kwargs[:ssl] and kwargs[:ssl_optional]
176 lines << "Use static-vhost-plain-#{sn}"
177 lines << "Use static-vhost-ssl-#{sn}"
179 lines << "Use common-dsa-vhost-https-redirect #{sn}"
180 lines << "Use static-vhost-ssl-#{sn}"
182 lines << "Use static-vhost-plain-#{sn}"
185 onion = scope.function_onion_global_service_hostname([sn])
186 lines << "Use static-vhost-onion-#{sn} #{onion}" if onion
193 vhost(lines, "mozilla.debian.net" , :ssl => true, :ssl_optional => true)
194 vhost(lines, "backports.debian.org" , :ssl => true)
195 vhost(lines, "incoming.debian.org" , :ssl => true, :ssl_optional => true)
196 vhost(lines, "incoming.ports.debian.org" , :ssl => true, :ssl_optional => true)
197 vhost(lines, "debdeltas.debian.net" , :ssl => true, :ssl_optional => true)
198 vhost(lines, "news.debian.net" , :ssl => true)
199 vhost(lines, "bootstrap.debian.net" , :ssl => true)
200 vhost(lines, "debaday.debian.net" , :ssl => true)
201 vhost(lines, "timeline.debian.net" , :ssl => true)
202 vhost(lines, "network-test.debian.org" , :extra => true)
203 vhost(lines, "blends.debian.org" , :ssl => true)
204 vhost(lines, "wnpp-by-tags.debian.net" , :ssl => true)
205 vhost(lines, "security-team.debian.org" , :ssl => true)
206 vhost(lines, "d-i.debian.org" , :ssl => true)
207 vhost(lines, "appstream.debian.org" , :ssl => true)
208 vhost(lines, "apt.buildd.debian.org" , :ssl => true)
209 vhost(lines, "dpl.debian.org" , :ssl => true)
210 vhost(lines, "dsa.debian.org" , :ssl => true)
211 vhost(lines, "rtc.debian.org" , :ssl => true)
212 vhost(lines, "mirror-master.debian.org" , :ssl => true)
213 vhost(lines, "onion.debian.org" , :ssl => true)
214 vhost(lines, "manpages.debian.org" , :ssl => true, :extra => true)
216 vhost(lines, "bits.debian.org" , :ssl => true, :extra => true)
217 vhost(lines, "micronews.debian.org" , :ssl => true)
218 vhost(lines, "metadata.ftp-master.debian.org", :extra => true)
220 vhost(lines, "10years.debconf.org" , :ssl => true)
221 vhost(lines, "debconf0.debconf.org" , :ssl => true)
222 vhost(lines, "debconf1.debconf.org" , :ssl => true)
223 vhost(lines, "debconf2.debconf.org" , :ssl => true)
224 vhost(lines, "debconf3.debconf.org" , :ssl => true)
225 vhost(lines, "debconf4.debconf.org" , :ssl => true)
226 vhost(lines, "debconf5.debconf.org" , :ssl => true)
227 vhost(lines, "debconf6.debconf.org" , :ssl => true)
228 vhost(lines, "debconf7.debconf.org" , :ssl => true)
229 vhost(lines, "debconf16.debconf.org" , :ssl => true)
230 vhost(lines, "es.debconf.org" , :ssl => true)
231 vhost(lines, "fr.debconf.org" , :ssl => true)
232 vhost(lines, "miniconf10.debconf.org" , :ssl => true)
234 vhost(lines, "deb.debian.org" , :extra => true)
235 vhost(lines, "release.debian.org" , :ssl => true, :extra => true)
236 vhost(lines, "www.ports.debian.org" , :ssl => true, :extra => true)
237 vhost(lines, "lintian.debian.org" , :ssl => true, :extra => true)
244 # www.backports.org is the historical place for the backports
245 # website and archive. It is now a CNAME to backports.debian.org:
246 # redirect http requests.
247 <VirtualHost <%= @vhost_listen %> >
248 ServerName www.backports.org
249 ServerAlias lists.backports.org
250 ServerAdmin debian-admin@debian.org
251 RedirectPermanent / http://backports.debian.org/
254 ######################
255 <VirtualHost <%= @vhost_listen %> >
256 ServerName www.debian-ports.org
257 ServerAlias debian-ports.org
258 ServerAdmin debian-admin@debian.org
259 RedirectPermanent / https://www.ports.debian.org/
262 <VirtualHost <%= @vhost_listen %> >
263 ServerName ports.debian.org
264 ServerAlias ports.debian.net
265 ServerAdmin debian-admin@debian.org
266 RedirectPermanent / https://www.ports.debian.org/
269 <VirtualHost <%= @vhost_listen %> >
270 ServerName incoming.debian-ports.org
271 ServerAdmin debian-admin@debian.org
272 RedirectPermanent / http://incoming.ports.debian.org/
275 <VirtualHost <%= @vhost_listen %> >
276 ServerName ftp.debian-ports.org
277 ServerAdmin debian-admin@debian.org
278 RedirectPermanent /archive http://www.ports.debian.org
279 RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
280 RedirectPermanent /debian-cd http://ftp.ports.debian.org/debian-ports-cd
281 RedirectPermanent / http://ftp.ports.debian.org/
284 <Macro vstatic-vhost-video.debian.net>
285 ServerName video.debian.net
286 ServerAdmin debian-admin@debian.org
287 Redirect / https://meetings-archive.debian.net/pub/debian-meetings/
290 <VirtualHost <%= @vhost_listen %> >
291 Use vstatic-vhost-video.debian.net
294 <VirtualHost <%= @vhost_listen_443 %> >
295 Use vstatic-vhost-video.debian.net
296 Use common-debian-service-ssl video.debian.net
302 # now only redirects remain
303 <VirtualHost <%= @vhost_listen %> >
304 ServerName women.debian.org
305 ServerAdmin debian-admin@debian.org
307 RedirectPermanent / http://www.debian.org/women/
309 RedirectPermanent /about/ http://www.debian.org/women/about
310 RedirectPermanent /contact/ http://www.debian.org/women/contact
311 RedirectPermanent /faqs/ http://www.debian.org/women/faq
312 RedirectPermanent /home/ http://www.debian.org/women/
313 RedirectPermanent /images/dw.png http://www.debian.org/women/dw.png
314 RedirectPermanent /involvement/ http://www.debian.org/women/participate
315 RedirectPermanent /mentoring/ http://www.debian.org/women/mentoring
316 RedirectPermanent /press/ http://wiki.debian.org/DebianWomen/Press
317 RedirectPermanent /profiles/ http://www.debian.org/women/profiles/
320 <VirtualHost <%= @vhost_listen %> >
321 ServerName volatile.debian.org
322 ServerAlias volatile-master.debian.org
323 ServerAdmin debian-admin@debian.org
324 RedirectPermanent / http://www.debian.org/volatile/
327 <VirtualHost <%= @vhost_listen %> >
328 ServerName ftp-master.metadata.debian.org
329 ServerAdmin debian-admin@debian.org
330 RedirectPermanent / http://metadata.ftp-master.debian.org/
333 <VirtualHost <%= @vhost_listen %> >
334 ServerName backports-master.debian.org
335 ServerAdmin debian-admin@debian.org
336 RedirectPermanent / https://backports.debian.org/
339 <VirtualHost <%= @vhost_listen %> >
340 ServerName manpages.debian.net
341 ServerAdmin debian-admin@debian.org
342 Redirect / https://manpages.debian.org/
348 Use common-dsa-vhost-https-redirect archive.debian.net
349 <VirtualHost <%= @vhost_listen_443 %> >
350 ServerName archive.debian.net
351 ServerAdmin debian-admin@debian.org
352 ErrorLog /var/log/apache2/archive.debian.net-error.log
353 CustomLog /var/log/apache2/archive.debian.net-access.log privacyssl
354 Use common-debian-service-ssl archive.debian.net
356 Use common-disabled-service