+++ /dev/null
-Include /etc/apache2/inc/static-mirror-vhost
- ServerName planet.debian.org
- ServerAlias planet.debian.net planeta.debian.net
- ServerAdmin planet@debian.org
-
- ErrorLog /var/log/apache2/planet.debian.org-error.log
- CustomLog /var/log/apache2/planet.debian.org-access.log combined
-
- <IfModule mod_userdir.c>
- UserDir disabled
- </IfModule>
-
- DocumentRoot /srv/static.debian.org/cur/planet.debian.org
- AddDefaultCharset utf-8
-
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^planeta.debian.net$ [NC]
- RewriteRule ^/(.*) http://planet.debian.org/es/$1 [R=permanent,L]
- RewriteCond %{HTTP_HOST} ^planet.debian.net$ [NC]
- RewriteRule ^/(.*) http://planet.debian.org/$1 [R=permanent,L]
-</VirtualHost>
-# vim:set syn=apache:
"/etc/cron.d/puppet-static-mirror":
content => "PATH=/usr/local/bin:/usr/bin:/bin\n@reboot staticsync sleep 60; static-mirror-run --one-stage /srv/static.debian.org bizet.debian.org:-live- > /dev/null\n",
;
+ }
- '/etc/apache2/inc':
- ensure => directory,
- ;
- '/etc/apache2/inc/static-mirror-vhost':
- content => template('roles/static-mirroring/apache-inc-static-mirror-vhost.erb'),
- ;
+ $vhost_listen = $::hostname ? {
+ klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80',
+ default => '*:80',
}
apache2::site { '010-planet.debian.org':
site => 'planet.debian.org',
- source => 'puppet:///modules/roles/static-mirroring/vhost/planet.debian.org',
+ content => 'puppet:///modules/roles/static-mirroring/vhost/planet.debian.org.erb',
}
}
# vim:set et:
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-##
-
-<% if hostname == "klecker" -%>
- <VirtualHost 130.89.148.14:80 2001:610:1908:b000::148:14:80>
-<% else -%>
- <VirtualHost *:80>
-<% end -%>
--- /dev/null
+<Virtualhost <%= vhost_listen %> >
+ ServerName planet.debian.org
+ ServerAlias planet.debian.net planeta.debian.net
+ ServerAdmin planet@debian.org
+
+ ErrorLog /var/log/apache2/planet.debian.org-error.log
+ CustomLog /var/log/apache2/planet.debian.org-access.log combined
+
+ <IfModule mod_userdir.c>
+ UserDir disabled
+ </IfModule>
+
+ DocumentRoot /srv/static.debian.org/cur/planet.debian.org
+ AddDefaultCharset utf-8
+
+ RewriteEngine On
+ RewriteCond %{HTTP_HOST} ^planeta.debian.net$ [NC]
+ RewriteRule ^/(.*) http://planet.debian.org/es/$1 [R=permanent,L]
+ RewriteCond %{HTTP_HOST} ^planet.debian.net$ [NC]
+ RewriteRule ^/(.*) http://planet.debian.org/$1 [R=permanent,L]
+</VirtualHost>
+# vim:set syn=apache: