]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Add vhost_listen_443
authorPeter Palfrader <peter@palfrader.org>
Wed, 1 Jan 2014 16:20:25 +0000 (17:20 +0100)
committerPeter Palfrader <peter@palfrader.org>
Wed, 1 Jan 2014 16:20:25 +0000 (17:20 +0100)
modules/roles/manifests/static_mirror.pp
modules/roles/manifests/www_mirror.pp
modules/roles/templates/static-mirroring/static-vhost.conf.erb

index 5962bf512f8babc2f8d4a8f1f286d2dfdd312a4b..f37b81006142d76b634ad890dd89a4a01d24d6b2 100644 (file)
@@ -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'),
index a6c344d258dd3308d9016e55e18fd386a0698f72..9cb9cf01b443b6add989c09902bfed365f961754 100644 (file)
@@ -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'),
index d9b636706d3c782c3d4f0f9482763549da209ae9..9b76aef63b40ade0fa4d8fa4d4a3b6629ab068fc 100644 (file)
 
 
 <Macro common-static-vhost-ssl $name>
-       Use common-debian-service-https-redirect <%= vhost_listen %> $name
+       <VirtualHost <%= vhost_listen %> >
+               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/
+       </VirtualHost>
 
-       <Virtualhost <%= vhost_listen %>:443 >
+       <Virtualhost <%= vhost_listen_443 %> >
                ServerName $name
                ServerAdmin debian-admin@lists.debian.org