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
54 <Macro vstatic-vhost-extra-bits.debian.org>
55 <IfModule mod_geoip.c>
56 CustomLog /var/log/apache2/bits.debian.org-public-access.log privacy+geo
60 <Macro vstatic-vhost-extra-metadata.ftp-master.debian.org>
61 AddDefaultCharset utf-8
63 # Rewrite away double slashes
65 RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ [NC]
66 RewriteRule . %1/%2 [R=301,L,NE]
68 <LocationMatch "/changelogs/(main|contrib|non-free)">
73 <Macro vstatic-vhost-extra-release.debian.org>
75 RewriteRule ^/migration/$ /migration/testing.pl
76 RewriteRule ^/migration/search/(.+)/$ /migration/testing.pl?package=$1
77 RewriteCond %{QUERY_STRING} package=((.)(.*))
78 RewriteRule ^/migration/testing.pl /migration/cache/%2/%1.html [PT,L]
79 RewriteRule ^/migration/testing.pl /migration/cache/_index.html
81 Alias /proposed-updates/ /srv/static.debian.org/mirrors/release.debian.org-pu/cur/
82 <Directory /srv/static.debian.org/mirrors/release.debian.org-pu/cur>
84 Options Indexes SymLinksIfOwnerMatch MultiViews
87 FilterDeclare gzip CONTENT_SET
88 FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
92 AddDefaultCharset utf-8
94 <Files *.debdiff.html.gz>
96 AddDefaultCharset utf-8
101 <Macro vstatic-vhost-extra-www.ports.debian.org>
102 <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
103 AllowOverride FileInfo Indexes Options=Multiviews
104 Options Multiviews Indexes FollowSymLinks Includes
108 AddOutputFilter INCLUDES .xhtml
112 <Macro vstatic-vhost-extra-lintian.debian.org>
113 AddDefaultCharset utf-8
115 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
118 # These three lines makes apache serve
119 # "lintian.log.gz" as a text/plain with encoding gzip
120 # making it easier to view the log in the browser.
122 AddEncoding x-gzip .gz
123 AddType text/plain .log
125 <IfModule mod_userdir.c>
126 AddOutputFilterByType DEFLATE image/svg+xml
127 AddOutputFilterByType DEFLATE text/plain
131 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
132 # Cache these for a year (3600 * 24 * 365.25)
133 # Files in here will change name if their content change
134 Header set Cache-Control "max-age=31557600, public"
138 RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
140 # Re-direct from the "old" locations to the new ones
141 RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
142 RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
144 # Map source packages to reports (this mapping is re-written once per lintian run,
145 # serve it as a 302 rather than a permanent redirect)
146 # Version-less request
147 RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
149 RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]
154 def vhost(lines, sn, kwargs={})
155 if scope.function_has_static_component([sn])
156 if not kwargs[:extra]
157 lines << "<Macro vstatic-vhost-extra-#{sn}>"
158 lines << " # mod macro does not like empty macros, so here's some content:"
159 lines << " <Directory /non-existant>"
160 lines << " </Directory>"
164 lines << "Use prepare-static-vhost #{sn}"
166 if kwargs[:ssl] and kwargs[:ssl_optional]
167 lines << "Use static-vhost-plain-#{sn}"
168 lines << "Use static-vhost-ssl-#{sn}"
170 lines << "Use common-dsa-vhost-https-redirect #{sn}"
171 lines << "Use static-vhost-ssl-#{sn}"
173 lines << "Use static-vhost-plain-#{sn}"
176 onion = scope.function_onion_global_service_hostname([sn])
177 lines << "Use static-vhost-onion-#{sn} #{onion}" if onion
184 vhost(lines, "mozilla.debian.net" , :ssl => true, :ssl_optional => true)
185 vhost(lines, "backports.debian.org" , :ssl => true)
186 vhost(lines, "incoming.debian.org" , :ssl => true, :ssl_optional => true)
187 vhost(lines, "incoming.ports.debian.org" , :ssl => true, :ssl_optional => true)
188 vhost(lines, "debdeltas.debian.net" , :ssl => true, :ssl_optional => true)
189 vhost(lines, "news.debian.net" , :ssl => true)
190 vhost(lines, "bootstrap.debian.net" , :ssl => true)
191 vhost(lines, "debaday.debian.net" , :ssl => true)
192 vhost(lines, "timeline.debian.net" , :ssl => true)
193 vhost(lines, "network-test.debian.org" , :extra => true)
194 vhost(lines, "blends.debian.org" , :ssl => true)
195 vhost(lines, "wnpp-by-tags.debian.net" , :ssl => true)
196 vhost(lines, "security-team.debian.org" , :ssl => true)
197 vhost(lines, "d-i.debian.org" , :ssl => true)
198 vhost(lines, "appstream.debian.org" , :ssl => true)
199 vhost(lines, "apt.buildd.debian.org" , :ssl => true)
200 vhost(lines, "dsa.debian.org" , :ssl => true)
201 vhost(lines, "rtc.debian.org" , :ssl => true)
202 vhost(lines, "mirror-master.debian.org" , :ssl => true)
203 vhost(lines, "onion.debian.org" , :ssl => true)
204 vhost(lines, "manpages.debian.org" , :ssl => true, :extra => true)
206 vhost(lines, "bits.debian.org" , :ssl => true, :extra => true)
207 vhost(lines, "micronews.debian.org" , :ssl => true)
208 vhost(lines, "metadata.ftp-master.debian.org", :extra => true)
210 vhost(lines, "10years.debconf.org" , :ssl => true)
211 vhost(lines, "debconf0.debconf.org" , :ssl => true)
212 vhost(lines, "debconf1.debconf.org" , :ssl => true)
213 vhost(lines, "debconf2.debconf.org" , :ssl => true)
214 vhost(lines, "debconf3.debconf.org" , :ssl => true)
215 vhost(lines, "debconf4.debconf.org" , :ssl => true)
216 vhost(lines, "debconf5.debconf.org" , :ssl => true)
217 vhost(lines, "debconf6.debconf.org" , :ssl => true)
218 vhost(lines, "debconf7.debconf.org" , :ssl => true)
219 vhost(lines, "debconf16.debconf.org" , :ssl => true)
220 vhost(lines, "es.debconf.org" , :ssl => true)
221 vhost(lines, "fr.debconf.org" , :ssl => true)
222 vhost(lines, "miniconf10.debconf.org" , :ssl => true)
224 vhost(lines, "deb.debian.org" , :extra => true)
225 vhost(lines, "release.debian.org" , :ssl => true, :extra => true)
226 vhost(lines, "www.ports.debian.org" , :ssl => true, :extra => true)
227 vhost(lines, "lintian.debian.org" , :ssl => true, :extra => true)
234 # www.backports.org is the historical place for the backports
235 # website and archive. It is now a CNAME to backports.debian.org:
236 # redirect http requests.
237 <VirtualHost <%= vhost_listen %> >
238 ServerName www.backports.org
239 ServerAlias lists.backports.org
240 ServerAdmin debian-admin@debian.org
241 RedirectPermanent / http://backports.debian.org/
244 ######################
245 <VirtualHost <%= vhost_listen %> >
246 ServerName www.debian-ports.org
247 ServerAlias debian-ports.org
248 ServerAdmin debian-admin@debian.org
249 RedirectPermanent / https://www.ports.debian.org/
252 <VirtualHost <%= vhost_listen %> >
253 ServerName ports.debian.org
254 ServerAlias ports.debian.net
255 ServerAdmin debian-admin@debian.org
256 RedirectPermanent / https://www.ports.debian.org/
259 <VirtualHost <%= vhost_listen %> >
260 ServerName incoming.debian-ports.org
261 ServerAdmin debian-admin@debian.org
262 RedirectPermanent / http://incoming.ports.debian.org/
265 <VirtualHost <%= vhost_listen %> >
266 ServerName ftp.debian-ports.org
267 ServerAdmin debian-admin@debian.org
268 RedirectPermanent /archive http://www.ports.debian.org
269 RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
270 RedirectPermanent /debian-cd http://ftp.ports.debian.org/debian-ports-cd
271 RedirectPermanent / http://ftp.ports.debian.org/
274 <VirtualHost <%= vhost_listen %> >
275 ServerName video.debian.net
276 ServerAdmin debian-admin@debian.org
277 Redirect / http://meetings-archive.debian.net/pub/debian-meetings/
282 # now only redirects remain
283 <VirtualHost <%= vhost_listen %> >
284 ServerName women.debian.org
285 ServerAdmin debian-admin@debian.org
287 RedirectPermanent / http://www.debian.org/women/
289 RedirectPermanent /about/ http://www.debian.org/women/about
290 RedirectPermanent /contact/ http://www.debian.org/women/contact
291 RedirectPermanent /faqs/ http://www.debian.org/women/faq
292 RedirectPermanent /home/ http://www.debian.org/women/
293 RedirectPermanent /images/dw.png http://www.debian.org/women/dw.png
294 RedirectPermanent /involvement/ http://www.debian.org/women/participate
295 RedirectPermanent /mentoring/ http://www.debian.org/women/mentoring
296 RedirectPermanent /press/ http://wiki.debian.org/DebianWomen/Press
297 RedirectPermanent /profiles/ http://www.debian.org/women/profiles/
300 <VirtualHost <%= vhost_listen %> >
301 ServerName volatile.debian.org
302 ServerAlias volatile-master.debian.org
303 ServerAdmin debian-admin@debian.org
304 RedirectPermanent / http://www.debian.org/volatile/
307 <VirtualHost <%= vhost_listen %> >
308 ServerName ftp-master.metadata.debian.org
309 ServerAdmin debian-admin@debian.org
310 RedirectPermanent / http://metadata.ftp-master.debian.org/
313 <VirtualHost <%= vhost_listen %> >
314 ServerName backports-master.debian.org
315 ServerAdmin debian-admin@debian.org
316 RedirectPermanent / https://backports.debian.org/
319 <VirtualHost <%= vhost_listen %> >
320 ServerName manpages.debian.net
321 ServerAdmin debian-admin@debian.org
322 Redirect / https://manpages.debian.org/