summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-08-11 14:06:53 +0200
committermh <mh@immerda.ch>2010-08-11 14:06:53 +0200
commit7bbb0feacac0565457f5f56f65468429803454fb (patch)
tree7c384ffbea93302afebacdaae9492b3279fd02e1 /manifests
parentd50296539fc641b6387fcea712d950785c83cea3 (diff)
introduce logmode feature
We are now able to select how apache should log accesses. These modes are: * default: as you would use it * semianonym: no ips are logged for CustomLog, ErrorLog still logs ips * anonym: no ips are logged for CustomLog, ErrorLog is sent to /dev/null * nologs: all logs are sent to /dev/null
Diffstat (limited to 'manifests')
-rw-r--r--manifests/noiplog.pp5
-rw-r--r--manifests/vhost.pp7
-rw-r--r--manifests/vhost/gitweb.pp7
-rw-r--r--manifests/vhost/modperl.pp7
-rw-r--r--manifests/vhost/passenger.pp7
-rw-r--r--manifests/vhost/php/drupal.pp7
-rw-r--r--manifests/vhost/php/gallery2.pp7
-rw-r--r--manifests/vhost/php/joomla.pp7
-rw-r--r--manifests/vhost/php/mediawiki.pp7
-rw-r--r--manifests/vhost/php/silverstripe.pp7
-rw-r--r--manifests/vhost/php/simplemachine.pp7
-rw-r--r--manifests/vhost/php/spip.pp7
-rw-r--r--manifests/vhost/php/standard.pp7
-rw-r--r--manifests/vhost/php/typo3.pp7
-rw-r--r--manifests/vhost/php/webapp.pp7
-rw-r--r--manifests/vhost/php/wordpress.pp7
-rw-r--r--manifests/vhost/redirect.pp7
-rw-r--r--manifests/vhost/static.pp7
-rw-r--r--manifests/vhost/template.pp9
-rw-r--r--manifests/vhost/webdav.pp7
20 files changed, 140 insertions, 0 deletions
diff --git a/manifests/noiplog.pp b/manifests/noiplog.pp
new file mode 100644
index 0000000..355d7e6
--- /dev/null
+++ b/manifests/noiplog.pp
@@ -0,0 +1,5 @@
+class apache::noiplog {
+ apache::config::global{ 'noip_log.conf':
+ content => 'LogFormat "127.0.0.1 - - %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %V" noip';
+ }
+}
diff --git a/manifests/vhost.pp b/manifests/vhost.pp
index f1a20f0..cc163eb 100644
--- a/manifests/vhost.pp
+++ b/manifests/vhost.pp
@@ -9,11 +9,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost(
$ensure = present,
$path = 'absent',
$path_is_webdir = false,
$logpath = 'absent',
+ $logmode = 'default',
$template_mode = 'static',
$vhost_mode = 'template',
$vhost_source = 'absent',
@@ -67,6 +73,7 @@ define apache::vhost(
path => $path,
path_is_webdir => $path_is_webdir,
logpath => $logpath,
+ logmode => $logmode,
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
diff --git a/manifests/vhost/gitweb.pp b/manifests/vhost/gitweb.pp
index 084b04c..96e06b4 100644
--- a/manifests/vhost/gitweb.pp
+++ b/manifests/vhost/gitweb.pp
@@ -1,6 +1,12 @@
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::gitweb(
$ensure = present,
$domain = 'absent',
+ $logmode = 'default',
$domainalias = 'absent',
$server_admin = 'absent',
$owner = root,
@@ -29,6 +35,7 @@ define apache::vhost::gitweb(
openbsd => '/var/www/logs',
default => '/var/log/apache2'
},
+ logmode => $logmode,
template_mode => 'gitweb',
domain => $domain,
domainalias => $domainalias,
diff --git a/manifests/vhost/modperl.pp b/manifests/vhost/modperl.pp
index 98876e4..ef6b5d7 100644
--- a/manifests/vhost/modperl.pp
+++ b/manifests/vhost/modperl.pp
@@ -4,11 +4,17 @@
# and run_uid and run_gid are used as vhost users
# run_uid: the uid the vhost should run as with the itk module
# run_gid: the gid the vhost should run as with the itk module
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::modperl(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -71,6 +77,7 @@ define apache::vhost::modperl(
ensure => $ensure,
path => $path,
template_mode => 'perl',
+ logmode => $logmode,
vhost_mode => $vhost_mode,
vhost_source => $vhost_source,
vhost_destination => $vhost_destination,
diff --git a/manifests/vhost/passenger.pp b/manifests/vhost/passenger.pp
index 732758e..4a9b95e 100644
--- a/manifests/vhost/passenger.pp
+++ b/manifests/vhost/passenger.pp
@@ -1,10 +1,16 @@
# run_uid: the uid the vhost should run as with the mod_passenger module
# run_gid: the gid the vhost should run as with the mod_passenger module
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::passenger(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$manage_webdir = true,
$manage_docroot = true,
@@ -54,6 +60,7 @@ define apache::vhost::passenger(
ensure => $ensure,
path => $path,
template_mode => $template_mode,
+ logmode => $logmode,
vhost_mode => $vhost_mode,
vhost_source => $vhost_source,
vhost_destination => $vhost_destination,
diff --git a/manifests/vhost/php/drupal.pp b/manifests/vhost/php/drupal.pp
index f23a434..7f48841 100644
--- a/manifests/vhost/php/drupal.pp
+++ b/manifests/vhost/php/drupal.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::drupal(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -67,6 +73,7 @@ define apache::vhost::php::drupal(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_drupal',
owner => $owner,
diff --git a/manifests/vhost/php/gallery2.pp b/manifests/vhost/php/gallery2.pp
index 048a5f3..a846e7b 100644
--- a/manifests/vhost/php/gallery2.pp
+++ b/manifests/vhost/php/gallery2.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::gallery2(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -99,6 +105,7 @@ define apache::vhost::php::gallery2(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_gallery2',
owner => $owner,
diff --git a/manifests/vhost/php/joomla.pp b/manifests/vhost/php/joomla.pp
index 280792e..1af9bf9 100644
--- a/manifests/vhost/php/joomla.pp
+++ b/manifests/vhost/php/joomla.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::joomla(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -61,6 +67,7 @@ define apache::vhost::php::joomla(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_joomla',
owner => $owner,
diff --git a/manifests/vhost/php/mediawiki.pp b/manifests/vhost/php/mediawiki.pp
index d24ada9..cda1654 100644
--- a/manifests/vhost/php/mediawiki.pp
+++ b/manifests/vhost/php/mediawiki.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::mediawiki(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$manage_docroot = true,
$owner = root,
@@ -48,6 +54,7 @@ define apache::vhost::php::mediawiki(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
manage_docroot => $manage_docroot,
template_mode => 'php_mediawiki',
diff --git a/manifests/vhost/php/silverstripe.pp b/manifests/vhost/php/silverstripe.pp
index 3838d55..419a340 100644
--- a/manifests/vhost/php/silverstripe.pp
+++ b/manifests/vhost/php/silverstripe.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::silverstripe(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -59,6 +65,7 @@ define apache::vhost::php::silverstripe(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_silverstripe',
owner => $owner,
diff --git a/manifests/vhost/php/simplemachine.pp b/manifests/vhost/php/simplemachine.pp
index f1ea170..f015a2f 100644
--- a/manifests/vhost/php/simplemachine.pp
+++ b/manifests/vhost/php/simplemachine.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::simplemachine(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -59,6 +65,7 @@ define apache::vhost::php::simplemachine(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_simplemachine',
owner => $owner,
diff --git a/manifests/vhost/php/spip.pp b/manifests/vhost/php/spip.pp
index 5064e77..56c3e94 100644
--- a/manifests/vhost/php/spip.pp
+++ b/manifests/vhost/php/spip.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::spip(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -56,6 +62,7 @@ define apache::vhost::php::spip(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_spip',
owner => $owner,
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 090e803..aa92a0e 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::standard(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$manage_webdir = true,
$manage_docroot = true,
@@ -131,6 +137,7 @@ define apache::vhost::php::standard(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
run_mode => $run_mode,
run_uid => $run_uid,
run_gid => $run_gid,
diff --git a/manifests/vhost/php/typo3.pp b/manifests/vhost/php/typo3.pp
index dec227c..ab348ac 100644
--- a/manifests/vhost/php/typo3.pp
+++ b/manifests/vhost/php/typo3.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::typo3(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -59,6 +65,7 @@ define apache::vhost::php::typo3(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_typo3',
owner => $owner,
diff --git a/manifests/vhost/php/webapp.pp b/manifests/vhost/php/webapp.pp
index 22e932a..5e54782 100644
--- a/manifests/vhost/php/webapp.pp
+++ b/manifests/vhost/php/webapp.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::webapp(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$manage_webdir = true,
$manage_docroot = true,
@@ -85,6 +91,7 @@ define apache::vhost::php::webapp(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
manage_webdir => $manage_webdir,
manage_docroot => $manage_docroot,
diff --git a/manifests/vhost/php/wordpress.pp b/manifests/vhost/php/wordpress.pp
index c4e77f2..63e7267 100644
--- a/manifests/vhost/php/wordpress.pp
+++ b/manifests/vhost/php/wordpress.pp
@@ -10,11 +10,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::php::wordpress(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -60,6 +66,7 @@ define apache::vhost::php::wordpress(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
path => $path,
template_mode => 'php_wordpress',
owner => $owner,
diff --git a/manifests/vhost/redirect.pp b/manifests/vhost/redirect.pp
index 10b78bf..e828097 100644
--- a/manifests/vhost/redirect.pp
+++ b/manifests/vhost/redirect.pp
@@ -10,12 +10,18 @@
# - true: enable ssl for this vhost
# - force: enable ssl and redirect non-ssl to ssl
# - only: enable ssl only
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::redirect(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$target_url,
$server_admin = 'absent',
+ $logmode = 'default',
$ssl_mode = false
){
# create vhost configuration file
@@ -26,6 +32,7 @@ define apache::vhost::redirect(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
allow_override => $allow_override,
mod_security => false,
options => $target_url,
diff --git a/manifests/vhost/static.pp b/manifests/vhost/static.pp
index 307dfbe..640e172 100644
--- a/manifests/vhost/static.pp
+++ b/manifests/vhost/static.pp
@@ -1,11 +1,17 @@
# vhost_mode: which option is chosen to deploy the vhost
# - template: generate it from a template (default)
# - file: deploy a vhost file (apache::vhost::file will be called directly)
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::static(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -49,6 +55,7 @@ define apache::vhost::static(
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
+ logmode => $logmode,
allow_override => $allow_override,
do_includes => $do_includes,
options => $options,
diff --git a/manifests/vhost/template.pp b/manifests/vhost/template.pp
index bba3437..7c1f9be 100644
--- a/manifests/vhost/template.pp
+++ b/manifests/vhost/template.pp
@@ -20,11 +20,17 @@
# php_default_charset: default charset header for php.
# *default*: absent, which will set the same as default_charset
# of apache
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::template(
$ensure = present,
$path = 'absent',
$path_is_webdir = false,
$logpath = 'absent',
+ $logmode = 'default',
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
@@ -79,6 +85,9 @@ define apache::vhost::template(
'absent' => "$real_path/logs",
default => $logpath
}
+ case $logmode {
+ 'semianonym','anonym': { include apache::noiplog }
+ }
$servername = $domain ? {
'absent' => $name,
diff --git a/manifests/vhost/webdav.pp b/manifests/vhost/webdav.pp
index 73c4a7a..770424c 100644
--- a/manifests/vhost/webdav.pp
+++ b/manifests/vhost/webdav.pp
@@ -5,11 +5,17 @@
# and run_uid and run_gid are used as vhost users
# run_uid: the uid the vhost should run as with the itk module
# run_gid: the gid the vhost should run as with the itk module
+# logmode:
+# - default: Do normal logging to CustomLog and ErrorLog
+# - nologs: Send every logging to /dev/null
+# - anonym: Don't log ips for CustomLog, send ErrorLog to /dev/null
+# - semianonym: Don't log ips for CustomLog, log normal ErrorLog
define apache::vhost::webdav(
$ensure = present,
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
+ $logmode = 'default',
$path = 'absent',
$owner = root,
$group = apache,
@@ -66,6 +72,7 @@ define apache::vhost::webdav(
path => $path,
path_is_webdir => $path_is_webdir,
logpath => $logpath,
+ logmode => $logmode,
template_mode => 'webdav',
vhost_mode => $vhost_mode,
vhost_source => $vhost_source,