From: Peter Palfrader Date: Tue, 12 Apr 2016 15:25:12 +0000 (+0200) Subject: Redirect /debian* on deb.d.o to cdn-fastly X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=ef16d2247d7eaf96f0de80e46dc16948e61363bf;p=mirror%2Fdsa-puppet.git Redirect /debian* on deb.d.o to cdn-fastly SRV support in apt only helps when there is no http proxy (transparent or directly configured). If there is a proxy, and it doesn't support SRV records as well, requests end up directly on the deb.d.o vhost. Do something smart in that case, namely redirect to cdn-fastly. --- diff --git a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb index 48cb490aa..7784d045b 100644 --- a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb +++ b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb @@ -44,11 +44,22 @@ vhost(lines, "es.debconf.org" , "ssl") vhost(lines, "fr.debconf.org" , "ssl") vhost(lines, "miniconf10.debconf.org" , "ssl") -vhost(lines, "deb.debian.org") +vhost(lines, "deb.debian.org", "with-extra", '"Use vhost-deb.debian.org-extra"') lines.join("\n") -%> + +###################### +# deb.debian.org +<% if scope.function_has_static_component(['deb.debian.org']) -%> + + RedirectPermanent /debian/ http://cdn-fastly.deb.debian.org/debian/ + RedirectPermanent /debian-debug/ http://cdn-fastly.deb.debian.org/debian-debug/ + RedirectPermanent /debian-security/ http://cdn-fastly.deb.debian.org/debian-security/ + +<% end -%> + ###################### # metadata.ftp-master.debian.org <% if scope.function_has_static_component(['metadata.ftp-master.debian.org']) -%>