ServerAlias network-test-backend.debian.org
</Macro>
+<Macro vhost-bits.debian.org-extra>
+ <IfModule mod_geoip.c>
+ CustomLog /var/log/apache2/bits.debian.org-public-access.log privacy+geo
+ </IfModule>
+</Macro>
+
+<Macro vhost-metadata.ftp-master.debian.org-extra>
+ AddDefaultCharset utf-8
+ <LocationMatch "/changelogs/(main|contrib|non-free)">
+ ForceType text/plain
+ </LocationMatch>
+</Macro>
+
<%=
def vhost(lines, sn, type=nil)
t = 'common-static-vhost'
if type then t += "-#{type}"; end
- lines << "Use #{t} #{sn}"
+ onion = scope.function_onion_global_service_hostname([sn])
+ onion = "unavailable-onion.invalid" if onion.nil?
+
+ lines << "Use #{t} #{sn} #{onion}"
end
end
vhost(lines, "appstream.debian.org", "ssl")
vhost(lines, "dsa.debian.org" , "ssl")
vhost(lines, "rtc.debian.org" , "ssl")
+vhost(lines, "onion.debian.org" , "ssl")
+
+vhost(lines, "bits.debian.org", "ssl-with-extra")
+vhost(lines, "metadata.ftp-master.debian.org", "with-extra")
vhost(lines, "10years.debconf.org" , "ssl")
vhost(lines, "debconf0.debconf.org", "ssl")
lines.join("\n")
-%>
-######################
-# metadata.ftp-master.debian.org
-<% if scope.function_has_static_component(['metadata.ftp-master.debian.org']) -%>
-<VirtualHost <%= vhost_listen %> >
- ServerName metadata.ftp-master.debian.org
- ServerAdmin debian-admin@lists.debian.org
-
- ErrorLog /var/log/apache2/metadata.ftp-master.debian.org-error.log
- CustomLog /var/log/apache2/metadata.ftp-master.debian.org-access.log privacy
-
- Use common-static-base metadata.ftp-master.debian.org
- AddDefaultCharset utf-8
- <LocationMatch "/changelogs/(main|contrib|non-free)">
- ForceType text/plain
- </LocationMatch>
-</VirtualHost>
-<% end -%>
-
-######################
-# bits.debian.org
-<% if scope.function_has_static_component(['bits.debian.org']) -%>
-<Macro static-bits.debian.org-base>
- ServerName bits.debian.org
- ServerAdmin debian-admin@lists.debian.org
-
- ErrorLog /var/log/apache2/bits.debian.org-error.log
- <IfModule mod_geoip.c>
- CustomLog /var/log/apache2/bits.debian.org-public-access.log privacy+geo
- </IfModule>
-
- Use common-static-base bits.debian.org
-</Macro>
-
-<Virtualhost <%= vhost_listen %> >
- RewriteEngine on
-
- RewriteEngine On
- RewriteCond %{REQUEST_URI} !^/feeds/
- RewriteRule ^/(.*)$ https://bits.debian.org/$1 [R,L]
- #RewriteRule ^/(.*)$ https://bits.debian.org/$1 [R=301,L]
-
- Use static-bits.debian.org-base
- CustomLog /var/log/apache2/bits.debian.org-access.log privacy
-</VirtualHost>
-
-<Virtualhost <%= vhost_listen_443 %> >
- Use static-bits.debian.org-base
- CustomLog /var/log/apache2/bits.debian.org-access.log privacyssl
-
- Use common-debian-service-ssl bits.debian.org
- Use common-ssl-HSTS
-</VirtualHost>
-<% end -%>
-
######################
# release.debian.org
<% if scope.function_has_static_component(['release.debian.org']) -%>
Use common-dsa-vhost-https-redirect release.debian.org
-<VirtualHost <%= vhost_listen_443 %> >
- ServerName release.debian.org
+
+<Macro vhost-inner-release.debian.org>
+
ServerAdmin debian-admin@debian.org
ErrorLog /var/log/apache2/release.debian.org-error.log
CustomLog /var/log/apache2/release.debian.org-access.log privacy
- Use common-debian-service-ssl release.debian.org
- Use common-ssl-HSTS
-
Use common-static-base release.debian.org
RewriteEngine on
ForceType text/plain
</Files>
</Directory>
+</Macro>
+
+<VirtualHost <%= vhost_listen_443 %> >
+ ServerName release.debian.org
+ Use common-debian-service-ssl release.debian.org
+ Use common-ssl-HSTS
+ Use vhost-inner-release.debian.org
+</VirtualHost>
+<% if scope.function_onion_global_service_hostname(['release.debian.org']) -%>
+<Virtualhost <%= vhost_listen %> >
+ ServerName <%= scope.function_onion_global_service_hostname(['release.debian.org']) %>
+ Use vhost-inner-release.debian.org
</VirtualHost>
<% end -%>
+<% end -%>
+
# www.backports.org
###################
# www.backports.org is the historical place for the backports
Use common-dsa-vhost-https-redirect www.ports.debian.org
-<Virtualhost <%= vhost_listen_443 %> >
- ServerName www.ports.debian.org
- ServerAlias www.ports-backend.debian.org
+<Macro vhost-inner-www.ports.debian.org>
ServerAdmin debian-admin@lists.debian.org
ErrorLog /var/log/apache2/www.ports.debian.org-error.log
CustomLog /var/log/apache2/www.ports.debian.org-access.log privacy
- Use common-debian-service-ssl www.ports.debian.org
- Use common-ssl-HSTS
<IfModule mod_userdir.c>
UserDir disabled
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
AddOutputFilter INCLUDES .xhtml
+</Macro>
+
+<Virtualhost <%= vhost_listen_443 %> >
+ ServerName www.ports.debian.org
+ ServerAlias www.ports-backend.debian.org
+ Use common-debian-service-ssl www.ports.debian.org
+ Use common-ssl-HSTS
+ Use vhost-inner-www.ports.debian.org
+</VirtualHost>
+<% if scope.function_onion_global_service_hostname(['www.ports.debian.org']) -%>
+<Virtualhost <%= vhost_listen %> >
+ ServerName <%= scope.function_onion_global_service_hostname(['www.ports.debian.org']) %>
+ Use vhost-inner-www.ports.debian.org
</VirtualHost>
<% end -%>
+<% end -%>
<VirtualHost <%= vhost_listen %> >
ServerName www.debian-ports.org