From: Peter Palfrader Date: Fri, 29 Jul 2016 17:49:38 +0000 (+0000) Subject: onions for standard static vhosts X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=8e0b642200f3c3af4e9ad7a0eaab1713baea9123;p=mirror%2Fdsa-puppet.git onions for standard static vhosts --- diff --git a/modules/roles/templates/static-mirroring/static-vhost.conf.erb b/modules/roles/templates/static-mirroring/static-vhost.conf.erb index e0413572c..c2d225289 100644 --- a/modules/roles/templates/static-mirroring/static-vhost.conf.erb +++ b/modules/roles/templates/static-mirroring/static-vhost.conf.erb @@ -43,9 +43,12 @@ - + + + > ServerName $name + ServerAlias $onion ServerAdmin debian-admin@lists.debian.org ErrorLog /var/log/apache2/$name-error.log @@ -56,17 +59,17 @@ - + # mod macro does not like empty macros, so here's some content: - Use common-static-vhost-with-extra $name + Use common-static-vhost-with-extra $name $onion - + Use common-dsa-vhost-https-redirect $name > @@ -81,6 +84,16 @@ Use common-static-base $name + + > + ServerName $onion + ServerAdmin debian-admin@lists.debian.org + + ErrorLog /var/log/apache2/$name-error.log + CustomLog /var/log/apache2/$name-access.log privacyssl + + Use common-static-base $name + # vim:ft=apache: 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 728c345ba..fe858846b 100644 --- a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb +++ b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb @@ -22,7 +22,10 @@ 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