Add micronews.debian.net static (re: #RT6364)
[mirror/dsa-puppet.git] / modules / roles / templates / static-mirroring / vhost / static-vhosts-simple.erb
1 # puppet maintained
2
3 ######################
4 # deb.debian.org
5 <% if scope.function_has_static_component(['deb.debian.org']) -%>
6 <Macro vhost-deb.debian.org-extra>
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/
11 </Macro>
12 <% end -%>
13
14 <Macro vhost-network-test.debian.org-extra>
15         ServerAlias network-test-backend.debian.org
16 </Macro>
17
18 <Macro vhost-bits.debian.org-extra>
19         <IfModule mod_geoip.c>
20                 CustomLog /var/log/apache2/bits.debian.org-public-access.log privacy+geo
21         </IfModule>
22 </Macro>
23
24 <Macro vhost-metadata.ftp-master.debian.org-extra>
25         AddDefaultCharset utf-8
26         <LocationMatch "/changelogs/(main|contrib|non-free)">
27                 ForceType text/plain
28         </LocationMatch>
29 </Macro>
30
31 <%=
32
33 def vhost(lines, sn, type=nil)
34   if scope.function_has_static_component([sn])
35     t = 'common-static-vhost'
36     if type then t += "-#{type}"; end
37
38     onion = scope.function_onion_global_service_hostname([sn])
39     onion = "unavailable-onion.invalid" if onion.nil?
40
41     lines << "Use #{t} #{sn} #{onion}"
42   end
43 end
44
45 lines = []
46 vhost(lines, "mozilla.debian.net")
47 vhost(lines, "backports.debian.org", "ssl")
48 vhost(lines, "incoming.debian.org")
49 vhost(lines, "incoming.ports.debian.org")
50 vhost(lines, "debdeltas.debian.net")
51 vhost(lines, "news.debian.net"         , "ssl")
52 vhost(lines, "debaday.debian.net"      , "ssl")
53 vhost(lines, "timeline.debian.net"     , "ssl")
54 vhost(lines, "network-test.debian.org" , "with-extra")
55 vhost(lines, "blends.debian.org"       , "ssl")
56 vhost(lines, "wnpp-by-tags.debian.net" , "ssl")
57 vhost(lines, "security-team.debian.org", "ssl")
58 vhost(lines, "d-i.debian.org"      , "ssl")
59 vhost(lines, "appstream.debian.org", "ssl")
60 vhost(lines, "dsa.debian.org"      , "ssl")
61 vhost(lines, "rtc.debian.org"      , "ssl")
62 vhost(lines, "onion.debian.org"    , "ssl")
63
64 vhost(lines, "bits.debian.org", "ssl-with-extra")
65 vhost(lines, "micronews.debian.net", "ssl")
66 vhost(lines, "metadata.ftp-master.debian.org", "with-extra")
67
68 vhost(lines, "10years.debconf.org" , "ssl")
69 vhost(lines, "debconf0.debconf.org", "ssl")
70 vhost(lines, "debconf1.debconf.org", "ssl")
71 vhost(lines, "debconf2.debconf.org", "ssl")
72 vhost(lines, "debconf3.debconf.org", "ssl")
73 vhost(lines, "debconf4.debconf.org", "ssl")
74 vhost(lines, "debconf5.debconf.org", "ssl")
75 vhost(lines, "debconf6.debconf.org", "ssl")
76 vhost(lines, "debconf7.debconf.org", "ssl")
77 vhost(lines, "es.debconf.org"      , "ssl")
78 vhost(lines, "fr.debconf.org"      , "ssl")
79 vhost(lines, "miniconf10.debconf.org" , "ssl")
80
81 vhost(lines, "deb.debian.org", "with-extra")
82
83 lines.join("\n")
84 -%>
85
86 ######################
87 # release.debian.org
88 <% if scope.function_has_static_component(['release.debian.org']) -%>
89 Use common-dsa-vhost-https-redirect release.debian.org
90
91 <Macro vhost-inner-release.debian.org>
92
93         ServerAdmin debian-admin@debian.org
94
95         ErrorLog /var/log/apache2/release.debian.org-error.log
96         CustomLog /var/log/apache2/release.debian.org-access.log privacy
97
98         Use common-static-base release.debian.org
99
100         RewriteEngine   on
101         RewriteRule             ^/migration/$                   /migration/testing.pl
102         RewriteRule             ^/migration/search/(.+)/$       /migration/testing.pl?package=$1
103         RewriteCond             %{QUERY_STRING} package=((.)(.*))
104         RewriteRule             ^/migration/testing.pl          /migration/cache/%2/%1.html [PT,L]
105         RewriteRule             ^/migration/testing.pl          /migration/cache/_index.html
106
107         Alias /proposed-updates/ /srv/static.debian.org/mirrors/release.debian.org-pu/cur/
108         <Directory /srv/static.debian.org/mirrors/release.debian.org-pu/cur>
109                 Require all granted
110                 Options Indexes SymLinksIfOwnerMatch MultiViews
111                 IndexOptions FancyIndexing NameWidth=*
112
113                 AddEncoding gzip .gz
114                 FilterDeclare gzip CONTENT_SET
115                 FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
116                 FilterChain gzip
117                 <Files *.debdiff.gz>
118                         ForceType text/plain
119                 </Files>
120         </Directory>
121 </Macro>
122
123 <VirtualHost <%= vhost_listen_443 %> >
124         ServerName release.debian.org
125         Use common-debian-service-ssl release.debian.org
126         Use common-ssl-HSTS
127         Use vhost-inner-release.debian.org
128 </VirtualHost>
129 <% if scope.function_onion_global_service_hostname(['release.debian.org']) -%>
130 <Virtualhost <%= vhost_listen %> >
131         ServerName <%= scope.function_onion_global_service_hostname(['release.debian.org']) %>
132         Use vhost-inner-release.debian.org
133 </VirtualHost>
134 <% end -%>
135
136 <% end -%>
137
138 # www.backports.org
139 ###################
140 # www.backports.org is the historical place for the backports
141 # website and archive.  It is now a CNAME to backports.debian.org:
142 # redirect http requests.
143 <VirtualHost <%= vhost_listen %> >
144         ServerName www.backports.org
145         ServerAlias lists.backports.org
146         ServerAdmin debian-admin@debian.org
147         RedirectPermanent / http://backports.debian.org/
148 </VirtualHost>
149
150 ######################
151 # www.ports.debian.org
152 <% if scope.function_has_static_component(['www.ports.debian.org']) -%>
153
154 Use common-dsa-vhost-https-redirect www.ports.debian.org
155
156 <Macro vhost-inner-www.ports.debian.org>
157         ServerAdmin debian-admin@lists.debian.org
158
159         ErrorLog /var/log/apache2/www.ports.debian.org-error.log
160         CustomLog /var/log/apache2/www.ports.debian.org-access.log privacy
161
162
163         <IfModule mod_userdir.c>
164                 UserDir disabled
165         </IfModule>
166         ServerSignature On
167
168         DocumentRoot /srv/static.debian.org/mirrors/www.ports.debian.org/cur
169         <Directory /srv/static.debian.org/mirrors/www.ports.debian.org/cur>
170                 AllowOverride FileInfo Indexes Options=Multiviews
171                 Options Multiviews Indexes FollowSymLinks Includes
172                 IndexOptions FancyIndexing NameWidth=*
173                 Require all granted
174         </Directory>
175
176         AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
177         AddOutputFilter INCLUDES .xhtml
178 </Macro>
179
180 <Virtualhost <%= vhost_listen_443 %> >
181         ServerName www.ports.debian.org
182         ServerAlias www.ports-backend.debian.org
183         Use common-debian-service-ssl www.ports.debian.org
184         Use common-ssl-HSTS
185         Use vhost-inner-www.ports.debian.org
186 </VirtualHost>
187 <% if scope.function_onion_global_service_hostname(['www.ports.debian.org']) -%>
188 <Virtualhost <%= vhost_listen %> >
189         ServerName <%= scope.function_onion_global_service_hostname(['www.ports.debian.org']) %>
190         Use vhost-inner-www.ports.debian.org
191 </VirtualHost>
192 <% end -%>
193 <% end -%>
194
195 <VirtualHost <%= vhost_listen %> >
196         ServerName www.debian-ports.org
197         ServerAlias debian-ports.org
198         ServerAdmin debian-admin@debian.org
199         RedirectPermanent / https://www.ports.debian.org/
200 </VirtualHost>
201
202 <VirtualHost <%= vhost_listen %> >
203         ServerName ports.debian.org
204         ServerAlias ports.debian.net
205         ServerAdmin debian-admin@debian.org
206         RedirectPermanent / https://www.ports.debian.org/
207 </VirtualHost>
208
209 <VirtualHost <%= vhost_listen %> >
210         ServerName incoming.debian-ports.org
211         ServerAdmin debian-admin@debian.org
212         RedirectPermanent / http://incoming.ports.debian.org/
213 </VirtualHost>
214
215 <VirtualHost <%= vhost_listen %> >
216         ServerName ftp.debian-ports.org
217         ServerAdmin debian-admin@debian.org
218         RedirectPermanent /archive http://www.ports.debian.org
219         RedirectPermanent /debian http://ftp.ports.debian.org/debian-ports
220         RedirectPermanent /debian-cd http://ftp.ports.debian.org/debian-ports-cd
221         RedirectPermanent / http://ftp.ports.debian.org/
222 </VirtualHost>
223
224 # video.debian.net
225 ###################
226 <VirtualHost <%= vhost_listen %> >
227         ServerName video.debian.net
228         ServerAdmin debian-admin@debian.org
229
230         Redirect / http://meetings-archive.debian.net/pub/debian-meetings/
231 </VirtualHost>
232
233 # historical sites
234 ##################
235 # now only redirects remain
236 <VirtualHost <%= vhost_listen %> >
237         ServerName women.debian.org
238         ServerAdmin debian-admin@debian.org
239
240         RedirectPermanent / http://www.debian.org/women/
241
242         RedirectPermanent /about/ http://www.debian.org/women/about
243         RedirectPermanent /contact/ http://www.debian.org/women/contact
244         RedirectPermanent /faqs/ http://www.debian.org/women/faq
245         RedirectPermanent /home/ http://www.debian.org/women/
246         RedirectPermanent /images/dw.png http://www.debian.org/women/dw.png
247         RedirectPermanent /involvement/ http://www.debian.org/women/participate
248         RedirectPermanent /mentoring/ http://www.debian.org/women/mentoring
249         RedirectPermanent /press/ http://wiki.debian.org/DebianWomen/Press
250         RedirectPermanent /profiles/ http://www.debian.org/women/profiles/
251 </VirtualHost>
252
253 <VirtualHost <%= vhost_listen %> >
254         ServerName volatile.debian.org
255         ServerAlias volatile-master.debian.org
256         ServerAdmin debian-admin@debian.org
257         RedirectPermanent / http://www.debian.org/volatile/
258 </VirtualHost>
259
260 <VirtualHost <%= vhost_listen %> >
261         ServerName ftp-master.metadata.debian.org
262         ServerAdmin debian-admin@debian.org
263         RedirectPermanent / http://metadata.ftp-master.debian.org/
264 </VirtualHost>
265
266 # vim:ft=apache: