From: Peter Palfrader Date: Mon, 30 Jan 2017 18:31:14 +0000 (+0100) Subject: use proper directory X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=bb6fa3a8749bd6860ec6f167d62db9119434886a;p=mirror%2Fdsa-puppet.git use proper directory --- diff --git a/modules/roles/manifests/debian_mirror.pp b/modules/roles/manifests/debian_mirror.pp index 822e0ca9b..194e65d8f 100644 --- a/modules/roles/manifests/debian_mirror.pp +++ b/modules/roles/manifests/debian_mirror.pp @@ -10,6 +10,9 @@ class roles::debian_mirror { mirror-isc => '149.20.4.15', default => undef, } + $archive_root = $::hostname ? { + default => '/srv/mirrors/debian, + } apache2::site { '010-ftp.debian.org': site => 'ftp.debian.org', diff --git a/modules/roles/templates/apache-ftp.debian.org.erb b/modules/roles/templates/apache-ftp.debian.org.erb index 8e512153b..98841dc7e 100644 --- a/modules/roles/templates/apache-ftp.debian.org.erb +++ b/modules/roles/templates/apache-ftp.debian.org.erb @@ -5,16 +5,18 @@ > ServerAdmin webmaster@debian.org - DocumentRoot /srv/ftp.debian.org/ftp.root ServerName ftp.debian.org <% if scope.function_onion_global_service_hostname(['ftp.debian.org']) -%> ServerAlias <%= scope.function_onion_global_service_hostname(['ftp.debian.org']) %> <% end %> + RedirectMatch "^/$" /debian/ + Alias /debian/ <%= archive_root >/ + ErrorLog /var/log/apache2/ftp.debian.org-error.log CustomLog /var/log/apache2/ftp.debian.org-access.log privacy - Use ftp-archive /srv/ftp.debian.org/ftp.root/debian + Use ftp-archive <%= archive_root > # vim:set syn=apache: