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',
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'),
+ }
}
--- /dev/null
+# puppet maintained
+
+<Macro common-static-vhost $name>
+<Macro common-$name>
+ <IfModule mod_userdir.c>
+ UserDir disabled
+ </IfModule>
+ ServerSignature On
+
+ DocumentRoot /srv/static.debian.org/cur/$name/
+ <Directory /srv/static.debian.org/cur/$name/>
+ AllowOverride FileInfo
+ Options Multiviews Indexes FollowSymLinks
+ IndexOptions FancyIndexing NameWidth=*
+ Order allow,deny
+ Allow from all
+ </Directory>
+
+ AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
+</Macro>
+
+<Virtualhost <%= vhost_listen %> >
+ 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
+</VirtualHost>
+
+</Macro>
+
+# vim:ft=apache: