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 http.debian.net
10 Redirect /debian/ http://cdn-fastly.deb.debian.org/debian/
11 Redirect /debian-debug/ http://cdn-fastly.deb.debian.org/debian-debug/
12 Redirect /debian-ports/ http://cdn-fastly.deb.debian.org/debian-ports/
13 Redirect /debian-security/ http://cdn-fastly.deb.debian.org/debian-security/
16 <VirtualHost <%= vhost_listen_443 %> >
17 ServerName deb.debian.org
19 ErrorLog /var/log/apache2/deb.debian.org-error.log
20 CustomLog /var/log/apache2/deb.debian.org-access.log privacyssl
22 Use common-debian-service-ssl deb.debian.org
25 ServerAdmin debian-admin@lists.debian.org
26 <IfModule mod_userdir.c>
31 DocumentRoot /srv/static.debian.org/mirrors/deb.debian.org/cur
32 <Directory /srv/static.debian.org/mirrors/deb.debian.org/cur>
33 AllowOverride FileInfo Indexes Options=Multiviews
34 Options Indexes SymLinksIfOwnerMatch
35 IndexOptions FancyIndexing NameWidth=*
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
85 IndexOptions FancyIndexing NameWidth=*
88 FilterDeclare gzip CONTENT_SET
89 FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
93 AddDefaultCharset utf-8
95 <Files *.debdiff.html.gz>
97 AddDefaultCharset utf-8
102 <Macro vstatic-vhost-extra-www.ports.debian.org>
103 <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
104 AllowOverride FileInfo Indexes Options=Multiviews
105 Options Multiviews Indexes FollowSymLinks Includes
106 IndexOptions FancyIndexing NameWidth=*
110 AddOutputFilter INCLUDES .xhtml
114 <Macro vstatic-vhost-extra-lintian.debian.org>
115 AddDefaultCharset utf-8
117 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
120 # These three lines makes apache serve
121 # "lintian.log.gz" as a text/plain with encoding gzip
122 # making it easier to view the log in the browser.
124 AddEncoding x-gzip .gz
125 AddType text/plain .log
127 <IfModule mod_userdir.c>
128 AddOutputFilterByType DEFLATE image/svg+xml
129 AddOutputFilterByType DEFLATE text/plain
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]
156 def vhost(lines, sn, kwargs={})
157 if scope.function_has_static_component([sn])
158 if not kwargs[:extra]
159 lines << "<Macro vstatic-vhost-extra-#{sn}>"
160 lines << " # mod macro does not like empty macros, so here's some content:"
161 lines << " <Directory /non-existant>"
162 lines << " </Directory>"
166 lines << "Use prepare-static-vhost #{sn}"
168 if kwargs[:ssl] and kwargs[:ssl_optional]
169 lines << "Use static-vhost-plain-#{sn}"
170 lines << "Use static-vhost-ssl-#{sn}"
172 lines << "Use common-dsa-vhost-https-redirect #{sn}"
173 lines << "Use static-vhost-ssl-#{sn}"
175 lines << "Use static-vhost-plain-#{sn}"
178 onion = scope.function_onion_global_service_hostname([sn])
179 lines << "Use static-vhost-onion-#{sn} #{onion}" if onion
186 vhost(lines, "mozilla.debian.net" , :ssl => true, :ssl_optional => true)
187 vhost(lines, "backports.debian.org" , :ssl => true)
188 vhost(lines, "incoming.debian.org" , :ssl => true, :ssl_optional => true)
189 vhost(lines, "incoming.ports.debian.org" , :ssl => true, :ssl_optional => true)
190 vhost(lines, "debdeltas.debian.net" , :ssl => true, :ssl_optional => true)
191 vhost(lines, "news.debian.net" , :ssl => true)
192 vhost(lines, "bootstrap.debian.net" , :ssl => true)
193 vhost(lines, "debaday.debian.net" , :ssl => true)
194 vhost(lines, "timeline.debian.net" , :ssl => true)
195 vhost(lines, "network-test.debian.org" , :extra => true)
196 vhost(lines, "blends.debian.org" , :ssl => true)
197 vhost(lines, "wnpp-by-tags.debian.net" , :ssl => true)
198 vhost(lines, "security-team.debian.org" , :ssl => true)
199 vhost(lines, "d-i.debian.org" , :ssl => true)
200 vhost(lines, "appstream.debian.org" , :ssl => true)
201 vhost(lines, "apt.buildd.debian.org" , :ssl => true)
202 vhost(lines, "dsa.debian.org" , :ssl => true)
203 vhost(lines, "rtc.debian.org" , :ssl => true)
204 vhost(lines, "onion.debian.org" , :ssl => true)
205 vhost(lines, "manpages.debian.org" , :ssl => true, :extra => true)
207 vhost(lines, "bits.debian.org" , :ssl => true, :extra => true)
208 vhost(lines, "micronews.debian.org" , :ssl => true)
209 vhost(lines, "metadata.ftp-master.debian.org", :extra => true)
211 vhost(lines, "10years.debconf.org" , :ssl => true)
212 vhost(lines, "debconf0.debconf.org" , :ssl => true)
213 vhost(lines, "debconf1.debconf.org" , :ssl => true)
214 vhost(lines, "debconf2.debconf.org" , :ssl => true)
215 vhost(lines, "debconf3.debconf.org" , :ssl => true)
216 vhost(lines, "debconf4.debconf.org" , :ssl => true)
217 vhost(lines, "debconf5.debconf.org" , :ssl => true)
218 vhost(lines, "debconf6.debconf.org" , :ssl => true)
219 vhost(lines, "debconf7.debconf.org" , :ssl => true)
220 vhost(lines, "debconf16.debconf.org" , :ssl => true)
221 vhost(lines, "es.debconf.org" , :ssl => true)
222 vhost(lines, "fr.debconf.org" , :ssl => true)
223 vhost(lines, "miniconf10.debconf.org" , :ssl => true)
225 vhost(lines, "deb.debian.org" , :extra => true)
226 vhost(lines, "release.debian.org" , :ssl => true, :extra => true)
227 vhost(lines, "www.ports.debian.org" , :ssl => true, :extra => true)
228 vhost(lines, "lintian.debian.org" , :ssl => true, :extra => true)
235 # www.backports.org is the historical place for the backports
236 # website and archive. It is now a CNAME to backports.debian.org:
237 # redirect http requests.
238 <VirtualHost <%= vhost_listen %> >
239 ServerName www.backports.org
240 ServerAlias lists.backports.org
241 ServerAdmin debian-admin@debian.org
242 RedirectPermanent / http://backports.debian.org/
245 ######################
246 <VirtualHost <%= vhost_listen %> >
247 ServerName www.debian-ports.org
248 ServerAlias debian-ports.org
249 ServerAdmin debian-admin@debian.org
250 RedirectPermanent / https://www.ports.debian.org/
253 <VirtualHost <%= vhost_listen %> >
254 ServerName ports.debian.org
255 ServerAlias ports.debian.net
256 ServerAdmin debian-admin@debian.org
257 RedirectPermanent / https://www.ports.debian.org/
260 <VirtualHost <%= vhost_listen %> >
261 ServerName incoming.debian-ports.org
262 ServerAdmin debian-admin@debian.org
263 RedirectPermanent / http://incoming.ports.debian.org/
266 <VirtualHost <%= vhost_listen %> >
267 ServerName ftp.debian-ports.org
268 ServerAdmin debian-admin@debian.org
269 RedirectPermanent /archive http://www.ports.debian.org
270 RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
271 RedirectPermanent /debian-cd http://ftp.ports.debian.org/debian-ports-cd
272 RedirectPermanent / http://ftp.ports.debian.org/
275 <VirtualHost <%= vhost_listen %> >
276 ServerName video.debian.net
277 ServerAdmin debian-admin@debian.org
278 Redirect / http://meetings-archive.debian.net/pub/debian-meetings/
283 # now only redirects remain
284 <VirtualHost <%= vhost_listen %> >
285 ServerName women.debian.org
286 ServerAdmin debian-admin@debian.org
288 RedirectPermanent / http://www.debian.org/women/
290 RedirectPermanent /about/ http://www.debian.org/women/about
291 RedirectPermanent /contact/ http://www.debian.org/women/contact
292 RedirectPermanent /faqs/ http://www.debian.org/women/faq
293 RedirectPermanent /home/ http://www.debian.org/women/
294 RedirectPermanent /images/dw.png http://www.debian.org/women/dw.png
295 RedirectPermanent /involvement/ http://www.debian.org/women/participate
296 RedirectPermanent /mentoring/ http://www.debian.org/women/mentoring
297 RedirectPermanent /press/ http://wiki.debian.org/DebianWomen/Press
298 RedirectPermanent /profiles/ http://www.debian.org/women/profiles/
301 <VirtualHost <%= vhost_listen %> >
302 ServerName volatile.debian.org
303 ServerAlias volatile-master.debian.org
304 ServerAdmin debian-admin@debian.org
305 RedirectPermanent / http://www.debian.org/volatile/
308 <VirtualHost <%= vhost_listen %> >
309 ServerName ftp-master.metadata.debian.org
310 ServerAdmin debian-admin@debian.org
311 RedirectPermanent / http://metadata.ftp-master.debian.org/
314 <VirtualHost <%= vhost_listen %> >
315 ServerName backports-master.debian.org
316 ServerAdmin debian-admin@debian.org
317 RedirectPermanent / https://backports.debian.org/