From c41841205ebbfc812fb00a775abca0d7239d3496 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 17 Dec 2012 14:27:20 +0100 Subject: [PATCH] static vhost --- modules/roles/manifests/static_mirror.pp | 9 +++++ .../static-mirroring/static-vhost.conf | 35 +++++++++++++++++++ .../vhost/static-vhosts-simple.erb | 5 +++ 3 files changed, 49 insertions(+) create mode 100644 modules/roles/templates/static-mirroring/static-vhost.conf create mode 100644 modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb diff --git a/modules/roles/manifests/static_mirror.pp b/modules/roles/manifests/static_mirror.pp index 1aa20d773..0acc1b9f2 100644 --- a/modules/roles/manifests/static_mirror.pp +++ b/modules/roles/manifests/static_mirror.pp @@ -10,6 +10,10 @@ class roles::static_mirror { apache2::module { 'rewrite': } apache2::module { 'expires': } + apache2::config { "local-static-vhost.conf": + source => "puppet:///modules/roles/static-mirroring/static-vhost.conf", + } + file { '/usr/local/bin/static-mirror-run': source => 'puppet:///modules/roles/static-mirroring/static-mirror-run', mode => '0555', @@ -35,4 +39,9 @@ class roles::static_mirror { site => 'planet.debian.org', content => template('roles/static-mirroring/vhost/planet.debian.org.erb'), } + + apache2::site { '10-static-vhosts-simple': + site => "static-vhosts-simple", + content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'), + } } diff --git a/modules/roles/templates/static-mirroring/static-vhost.conf b/modules/roles/templates/static-mirroring/static-vhost.conf new file mode 100644 index 000000000..ea0d2acb1 --- /dev/null +++ b/modules/roles/templates/static-mirroring/static-vhost.conf @@ -0,0 +1,35 @@ +# puppet maintained + + + + + UserDir disabled + + ServerSignature On + + DocumentRoot /srv/static.debian.org/cur/$name/ + + AllowOverride FileInfo + Options Multiviews Indexes FollowSymLinks + IndexOptions FancyIndexing NameWidth=* + Order allow,deny + Allow from all + + + AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css + + + > + ServerName $name + ServerAdmin debian-admin@lists.debian.org + + + ErrorLog /var/log/apache2/$name-error.log + CustomLog /var/log/apache2/$name-access.log combined + + Use common-$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 new file mode 100644 index 000000000..4cef975c3 --- /dev/null +++ b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb @@ -0,0 +1,5 @@ +# puppet maintained + +Use common-static-vhost mozilla.debian.net + +# vim:ft=apache: -- 2.20.1