5 <% if scope.function_has_static_component(['deb.debian.org']) -%>
6 <Macro vstatic-vhost-extra-deb.debian.org>
7 Redirect /debian/ http://cdn-fastly.deb.debian.org/debian/
8 Redirect /debian-debug/ http://cdn-fastly.deb.debian.org/debian-debug/
9 Redirect /debian-ports/ http://cdn-fastly.deb.debian.org/debian-ports/
10 Redirect /debian-security/ http://cdn-fastly.deb.debian.org/debian-security/
13 <VirtualHost <%= vhost_listen_443 %> >
14 ServerName deb.debian.org
16 ErrorLog /var/log/apache2/deb.debian.org-error.log
17 CustomLog /var/log/apache2/deb.debian.org-access.log privacyssl
19 Use common-debian-service-ssl deb.debian.org
22 ServerAdmin debian-admin@lists.debian.org
23 <IfModule mod_userdir.c>
28 DocumentRoot /srv/static.debian.org/mirrors/deb.debian.org/cur
29 <Directory /srv/static.debian.org/mirrors/deb.debian.org/cur>
30 AllowOverride FileInfo Indexes Options=Multiviews
31 Options Indexes SymLinksIfOwnerMatch
32 IndexOptions FancyIndexing NameWidth=*
36 Header set Surrogate-Key <%= hostname %>
38 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
40 Redirect /debian/ https://cdn-aws.deb.debian.org/debian/
41 Redirect /debian-debug/ https://cdn-aws.deb.debian.org/debian-debug/
42 Redirect /debian-ports/ https://cdn-aws.deb.debian.org/debian-ports/
43 Redirect /debian-security/ https://cdn-aws.deb.debian.org/debian-security/
47 <Macro vstatic-vhost-extra-network-test.debian.org>
48 ServerAlias network-test-backend.debian.org
51 <Macro vstatic-vhost-extra-bits.debian.org>
52 <IfModule mod_geoip.c>
53 CustomLog /var/log/apache2/bits.debian.org-public-access.log privacy+geo
57 <Macro vstatic-vhost-extra-metadata.ftp-master.debian.org>
58 AddDefaultCharset utf-8
60 # Rewrite away double slashes
62 RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ [NC]
63 RewriteRule . %1/%2 [R=301,L,NE]
65 <LocationMatch "/changelogs/(main|contrib|non-free)">
70 <Macro vstatic-vhost-extra-release.debian.org>
72 RewriteRule ^/migration/$ /migration/testing.pl
73 RewriteRule ^/migration/search/(.+)/$ /migration/testing.pl?package=$1
74 RewriteCond %{QUERY_STRING} package=((.)(.*))
75 RewriteRule ^/migration/testing.pl /migration/cache/%2/%1.html [PT,L]
76 RewriteRule ^/migration/testing.pl /migration/cache/_index.html
78 Alias /proposed-updates/ /srv/static.debian.org/mirrors/release.debian.org-pu/cur/
79 <Directory /srv/static.debian.org/mirrors/release.debian.org-pu/cur>
81 Options Indexes SymLinksIfOwnerMatch MultiViews
82 IndexOptions FancyIndexing NameWidth=*
85 FilterDeclare gzip CONTENT_SET
86 FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
90 AddDefaultCharset utf-8
95 <Macro vstatic-vhost-extra-www.ports.debian.org>
96 <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
97 AllowOverride FileInfo Indexes Options=Multiviews
98 Options Multiviews Indexes FollowSymLinks Includes
99 IndexOptions FancyIndexing NameWidth=*
103 AddOutputFilter INCLUDES .xhtml
107 <Macro vstatic-vhost-extra-lintian.debian.org>
108 AddDefaultCharset utf-8
110 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
113 # These three lines makes apache serve
114 # "lintian.log.gz" as a text/plain with encoding gzip
115 # making it easier to view the log in the browser.
117 AddEncoding x-gzip .gz
118 AddType text/plain .log
120 <IfModule mod_userdir.c>
121 AddOutputFilterByType DEFLATE image/svg+xml
122 AddOutputFilterByType DEFLATE text/plain
126 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
127 # Cache these for a year (3600 * 24 * 365.25)
128 # Files in here will change name if their content change
129 Header set Cache-Control "max-age=31557600, public"
133 RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
135 # Re-direct from the "old" locations to the new ones
136 RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
137 RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
139 # Map source packages to reports (this mapping is re-written once per lintian run,
140 # serve it as a 302 rather than a permanent redirect)
141 # Version-less request
142 RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
144 RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]
149 def vhost(lines, sn, kwargs={})
150 if scope.function_has_static_component([sn])
151 if not kwargs[:extra]
152 lines << "<Macro vstatic-vhost-extra-#{sn}>"
153 lines << " # mod macro does not like empty macros, so here's some content:"
154 lines << " <Directory /non-existant>"
155 lines << " </Directory>"
159 lines << "Use prepare-static-vhost #{sn}"
161 if kwargs[:ssl] and kwargs[:ssl_optional]
162 lines << "Use static-vhost-plain-#{sn}"
163 lines << "Use static-vhost-ssl-#{sn}"
165 lines << "Use common-dsa-vhost-https-redirect #{sn}"
166 lines << "Use static-vhost-ssl-#{sn}"
168 lines << "Use static-vhost-plain-#{sn}"
171 onion = scope.function_onion_global_service_hostname([sn])
172 lines << "Use static-vhost-onion-#{sn} #{onion}" if onion
179 vhost(lines, "mozilla.debian.net" , :ssl => true, :ssl_optional => true)
180 vhost(lines, "backports.debian.org" , :ssl => true)
181 vhost(lines, "incoming.debian.org" , :ssl => true, :ssl_optional => true)
182 vhost(lines, "incoming.ports.debian.org" , :ssl => true, :ssl_optional => true)
183 vhost(lines, "debdeltas.debian.net" , :ssl => true, :ssl_optional => true)
184 vhost(lines, "news.debian.net" , :ssl => true)
185 vhost(lines, "bootstrap.debian.net" , :ssl => true)
186 vhost(lines, "debaday.debian.net" , :ssl => true)
187 vhost(lines, "timeline.debian.net" , :ssl => true)
188 vhost(lines, "network-test.debian.org" , :extra => true)
189 vhost(lines, "blends.debian.org" , :ssl => true)
190 vhost(lines, "wnpp-by-tags.debian.net" , :ssl => true)
191 vhost(lines, "security-team.debian.org" , :ssl => true)
192 vhost(lines, "d-i.debian.org" , :ssl => true)
193 vhost(lines, "appstream.debian.org" , :ssl => true)
194 vhost(lines, "dsa.debian.org" , :ssl => true)
195 vhost(lines, "rtc.debian.org" , :ssl => true)
196 vhost(lines, "onion.debian.org" , :ssl => true)
198 vhost(lines, "bits.debian.org" , :ssl => true, :extra => true)
199 vhost(lines, "micronews.debian.org" , :ssl => true)
200 vhost(lines, "metadata.ftp-master.debian.org", :extra => true)
202 vhost(lines, "10years.debconf.org" , :ssl => true)
203 vhost(lines, "debconf0.debconf.org" , :ssl => true)
204 vhost(lines, "debconf1.debconf.org" , :ssl => true)
205 vhost(lines, "debconf2.debconf.org" , :ssl => true)
206 vhost(lines, "debconf3.debconf.org" , :ssl => true)
207 vhost(lines, "debconf4.debconf.org" , :ssl => true)
208 vhost(lines, "debconf5.debconf.org" , :ssl => true)
209 vhost(lines, "debconf6.debconf.org" , :ssl => true)
210 vhost(lines, "debconf7.debconf.org" , :ssl => true)
211 vhost(lines, "debconf16.debconf.org" , :ssl => true)
212 vhost(lines, "es.debconf.org" , :ssl => true)
213 vhost(lines, "fr.debconf.org" , :ssl => true)
214 vhost(lines, "miniconf10.debconf.org" , :ssl => true)
216 vhost(lines, "deb.debian.org" , :extra => true)
217 vhost(lines, "release.debian.org" , :ssl => true, :extra => true)
218 vhost(lines, "www.ports.debian.org" , :ssl => true, :extra => true)
219 vhost(lines, "lintian.debian.org" , :ssl => true, :extra => true)
226 # www.backports.org is the historical place for the backports
227 # website and archive. It is now a CNAME to backports.debian.org:
228 # redirect http requests.
229 <VirtualHost <%= vhost_listen %> >
230 ServerName www.backports.org
231 ServerAlias lists.backports.org
232 ServerAdmin debian-admin@debian.org
233 RedirectPermanent / http://backports.debian.org/
236 ######################
237 <VirtualHost <%= vhost_listen %> >
238 ServerName www.debian-ports.org
239 ServerAlias debian-ports.org
240 ServerAdmin debian-admin@debian.org
241 RedirectPermanent / https://www.ports.debian.org/
244 <VirtualHost <%= vhost_listen %> >
245 ServerName ports.debian.org
246 ServerAlias ports.debian.net
247 ServerAdmin debian-admin@debian.org
248 RedirectPermanent / https://www.ports.debian.org/
251 <VirtualHost <%= vhost_listen %> >
252 ServerName incoming.debian-ports.org
253 ServerAdmin debian-admin@debian.org
254 RedirectPermanent / http://incoming.ports.debian.org/
257 <VirtualHost <%= vhost_listen %> >
258 ServerName ftp.debian-ports.org
259 ServerAdmin debian-admin@debian.org
260 RedirectPermanent /archive http://www.ports.debian.org
261 RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
262 RedirectPermanent /debian-cd http://ftp.ports.debian.org/debian-ports-cd
263 RedirectPermanent / http://ftp.ports.debian.org/
266 <VirtualHost <%= vhost_listen %> >
267 ServerName video.debian.net
268 ServerAdmin debian-admin@debian.org
269 Redirect / http://meetings-archive.debian.net/pub/debian-meetings/
274 # now only redirects remain
275 <VirtualHost <%= vhost_listen %> >
276 ServerName women.debian.org
277 ServerAdmin debian-admin@debian.org
279 RedirectPermanent / http://www.debian.org/women/
281 RedirectPermanent /about/ http://www.debian.org/women/about
282 RedirectPermanent /contact/ http://www.debian.org/women/contact
283 RedirectPermanent /faqs/ http://www.debian.org/women/faq
284 RedirectPermanent /home/ http://www.debian.org/women/
285 RedirectPermanent /images/dw.png http://www.debian.org/women/dw.png
286 RedirectPermanent /involvement/ http://www.debian.org/women/participate
287 RedirectPermanent /mentoring/ http://www.debian.org/women/mentoring
288 RedirectPermanent /press/ http://wiki.debian.org/DebianWomen/Press
289 RedirectPermanent /profiles/ http://www.debian.org/women/profiles/
292 <VirtualHost <%= vhost_listen %> >
293 ServerName volatile.debian.org
294 ServerAlias volatile-master.debian.org
295 ServerAdmin debian-admin@debian.org
296 RedirectPermanent / http://www.debian.org/volatile/
299 <VirtualHost <%= vhost_listen %> >
300 ServerName ftp-master.metadata.debian.org
301 ServerAdmin debian-admin@debian.org
302 RedirectPermanent / http://metadata.ftp-master.debian.org/