summaryrefslogtreecommitdiff
path: root/manifests/vhost/template.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/vhost/template.pp')
-rw-r--r--manifests/vhost/template.pp37
1 files changed, 29 insertions, 8 deletions
diff --git a/manifests/vhost/template.pp b/manifests/vhost/template.pp
index d7e9e07..36aa0cd 100644
--- a/manifests/vhost/template.pp
+++ b/manifests/vhost/template.pp
@@ -25,6 +25,28 @@
# - 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
+#
+# run_mode: controls in which mode the vhost should be run, there are different setups
+# possible:
+# - normal: (*default*) run vhost with the current active worker (default: prefork) don't
+# setup anything special
+# - itk: run vhost with the mpm_itk module (Incompatibility: cannot be used in combination
+# with 'proxy-itk' & 'static-itk' mode)
+# - proxy-itk: run vhost with a dual prefork/itk setup, where prefork just proxies all the
+# requests for the itk setup, that listens only on the loobpack device.
+# (Incompatibility: cannot be used in combination with the itk setup.)
+# - static-itk: run vhost with a dual prefork/itk setup, where prefork serves all the static
+# content and proxies the dynamic calls to the itk setup, that listens only on
+# the loobpack device (Incompatibility: cannot be used in combination with
+# 'itk' mode)
+#
+# 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
+#
+# mod_security: Whether we use mod_security or not (will include mod_security module)
+# - false: don't activate mod_security
+# - true: (*default*) activate mod_security
+#
define apache::vhost::template(
$ensure = present,
$path = 'absent',
@@ -61,13 +83,6 @@ define apache::vhost::template(
$ldap_auth = false,
$ldap_user = 'any'
){
- if $mod_security {
- case $run_mode {
- 'itk': { include mod_security::itk }
- default: { include mod_security }
- }
- }
-
$real_path = $path ? {
'absent' => $operatingsystem ? {
openbsd => "/var/www/htdocs/$name",
@@ -101,7 +116,11 @@ define apache::vhost::template(
$real_htpasswd_path = $htpasswd_path
}
case $run_mode {
- 'itk': {
+ 'proxy-itk': { $logfileprefix = 'proxy' }
+ 'static-itk': { $logfileprefix = 'static' }
+ }
+ case $run_mode {
+ 'itk','proxy-itk','static-itk': {
case $run_uid {
'absent': { fail("you have to define run_uid for $name on $fqdn") }
}
@@ -144,6 +163,8 @@ define apache::vhost::template(
apache::vhost::file{$name:
ensure => $ensure,
do_includes => $do_includes,
+ run_mode => $run_mode,
+ mod_security => $mod_security,
htpasswd_file => $htpasswd_file,
htpasswd_path => $htpasswd_path,
use_mod_macro => $use_mod_macro,