LogFormat "0.0.0.0 - %u %{[%d/%b/%Y:00:00:00 %z]}t \"%r\" %>s %b \"%{Referer}i\" \"-\"" privacy
LogFormat "0.0.0.1 - %u %{[%d/%b/%Y:00:00:00 %z]}t \"%r\" %>s %b \"%{Referer}i\" \"-\"" privacyssl
+<IfModule mod_geoip.c>
+LogFormat "0.0.0.0 - %u %{[%d/%b/%Y:00:00:00 %z]}t \"%r\" %>s %b \"%{Referer}i\" \"-\" %{GEOIP_COUNTRY_CODE}e" privacy+geo
+</IfModule>
--- /dev/null
+begin
+ require 'etc'
+
+ Facter.add("staticsync_key") do
+ setcode do
+ key = nil
+ keyfile = '/home/staticsync/.ssh/id_rsa.pub'
+ if FileTest.exist?(keyfile)
+ key = File.open(keyfile).read.chomp
+ end
+ key
+ end
+ end
+
+ Facter.add("staticsync_user_exists") do
+ setcode do
+ result = ''
+ begin
+ if Etc.getpwnam('staticsync')
+ result = true
+ end
+ rescue ArgumentError
+ end
+ result
+ end
+ end
+
+
+
+ Facter.add("weblogsync_key") do
+ setcode do
+ key = nil
+ keyfile = '/home/weblogsync/.ssh/id_rsa.pub'
+ if FileTest.exist?(keyfile)
+ key = File.open(keyfile).read.chomp
+ end
+ key
+ end
+ end
+
+ Facter.add("weblogsync_user_exists") do
+ setcode do
+ result = ''
+ begin
+ if Etc.getpwnam('weblogsync')
+ result = true
+ end
+ rescue ArgumentError
+ end
+ result
+ end
+ end
+
+rescue Exception => e
+end
+# vim:set et:
+# vim:set ts=4:
+# vim:set shiftwidth=4:
+++ /dev/null
-begin
- require 'etc'
-
- Facter.add("staticsync_key") do
- setcode do
- key = nil
- keyfile = '/home/staticsync/.ssh/id_rsa.pub'
- if FileTest.exist?(keyfile)
- key = File.open(keyfile).read.chomp
- end
- key
- end
- end
-
- Facter.add("staticsync_user_exists") do
- setcode do
- result = ''
- begin
- if Etc.getpwnam('staticsync')
- result = true
- end
- rescue ArgumentError
- end
- result
- end
- end
-
-rescue Exception => e
-end
-# vim:set et:
-# vim:set ts=4:
-# vim:set shiftwidth=4:
--- /dev/null
+class roles::weblog_provider {
+ if ! $::weblogsync_key {
+ exec { 'create-weblogsync-key':
+ command => '/bin/su - weblogsync -c \'mkdir -p -m 02700 .ssh && ssh-keygen -C "`whoami`@`hostname` (`date +%Y-%m-%d`)" -P "" -f .ssh/id_rsa -q\'',
+ onlyif => '/usr/bin/getent passwd weblogsync > /dev/null && ! [ -e /home/weblogsync/.ssh/id_rsa ]'
+ }
+ } else {
+ file { '/etc/cron.d/puppet-weblog-provider':
+ content => "SHELL=/bin/bash\n\n0 */4 * * * weblogsync sleep $((RANDOM % 1800)); rsync -a --delete /var/log/apache2/*-public-access.log-*gz weblogsync@ravel:-weblogs-incoming-\n",
+ }
+ }
+}
# puppet maintained
-<Macro common-static-vhost $name>
-<Macro common-$name>
+<Macro common-static-base $name>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
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 privacy
+<Macro common-static-vhost $name>
+ <Virtualhost <%= vhost_listen %> >
+ ServerName $name
+ ServerAdmin debian-admin@lists.debian.org
- Use common-$name
-</VirtualHost>
+ ErrorLog /var/log/apache2/$name-error.log
+ CustomLog /var/log/apache2/$name-access.log privacy
+ Use common-static-base $name
+ </VirtualHost>
</Macro>
+<Macro common-static-vhost-publiclog $name>
+ <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 privacy
+ <IfModule mod_geoip.c>
+ CustomLog /var/log/apache2/$name-public-access.log privacy+geo
+ </IfModule>
+
+ Use common-static-base $name
+ </VirtualHost>
+</Macro>
+
+
# vim:ft=apache:
# puppet maintained
Use common-static-vhost mozilla.debian.net
-Use common-static-vhost bits.debian.org
Use common-static-vhost backports.debian.org
+Use common-static-vhost-publiclog bits.debian.org
# www.backports.org is the historical place for the backports
# website and archive. It is now a CNAME to backports.debian.org: