From: Peter Palfrader Date: Wed, 1 Jan 2014 16:20:25 +0000 (+0100) Subject: Add vhost_listen_443 X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=52ab75241aa59786d9cf7af14dc99c8ee1641483;p=mirror%2Fdsa-puppet.git Add vhost_listen_443 --- diff --git a/modules/roles/manifests/static_mirror.pp b/modules/roles/manifests/static_mirror.pp index 5962bf512..f37b81006 100644 --- a/modules/roles/manifests/static_mirror.pp +++ b/modules/roles/manifests/static_mirror.pp @@ -31,6 +31,10 @@ class roles::static_mirror { klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80', default => '*:80', } + $vhost_listen_443 = $::hostname ? { + klecker => '130.89.148.14:443 [2001:610:1908:b000::148:14]:443', + default => '*:443', + } apache2::config { 'local-static-vhost.conf': content => template('roles/static-mirroring/static-vhost.conf.erb'), diff --git a/modules/roles/manifests/www_mirror.pp b/modules/roles/manifests/www_mirror.pp index a6c344d25..9cb9cf01b 100644 --- a/modules/roles/manifests/www_mirror.pp +++ b/modules/roles/manifests/www_mirror.pp @@ -3,6 +3,7 @@ class roles::www_mirror { $wwwdo_document_root = '/srv/www.debian.org/www' $vhost_listen = '*:80' + $vhost_listen_443 = '*:443' apache2::site { '010-www.debian.org': site => 'www.debian.org', content => template('roles/apache-www.debian.org.erb'), diff --git a/modules/roles/templates/static-mirroring/static-vhost.conf.erb b/modules/roles/templates/static-mirroring/static-vhost.conf.erb index d9b636706..9b76aef63 100644 --- a/modules/roles/templates/static-mirroring/static-vhost.conf.erb +++ b/modules/roles/templates/static-mirroring/static-vhost.conf.erb @@ -53,9 +53,17 @@ - Use common-debian-service-https-redirect <%= vhost_listen %> $name + > + ServerName $name + ServerAdmin debian-admin@lists.debian.org + + CustomLog /var/log/apache2/$name-access.log privacy + ErrorLog /var/log/apache2/$name-error.log + + Redirect permanent / https://$name/ + - :443 > + > ServerName $name ServerAdmin debian-admin@lists.debian.org