summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2014-02-23 15:17:06 +0100
committermh <mh@immerda.ch>2014-02-23 15:17:06 +0100
commitbcb25abcb26f7ebb522f3c0dc3288c6a97ccf158 (patch)
tree091fab6e30f59bdc1ea31007c8006e20c7ccf9fd /manifests
parent266a521842e55c5afdb9fe849c3fe392bb0b4ae2 (diff)
introduce a datadir for all dynamic hostings
Diffstat (limited to 'manifests')
-rw-r--r--manifests/centos.pp1
-rw-r--r--manifests/openbsd.pp4
-rw-r--r--manifests/vhost/php/standard.pp2
-rw-r--r--manifests/vhost/static.pp1
-rw-r--r--manifests/vhost/webdav.pp1
-rw-r--r--manifests/vhost/webdir.pp9
6 files changed, 16 insertions, 2 deletions
diff --git a/manifests/centos.pp b/manifests/centos.pp
index 02adf77..3d9664d 100644
--- a/manifests/centos.pp
+++ b/manifests/centos.pp
@@ -39,6 +39,7 @@ class apache::centos inherits apache::package {
selinux::fcontext{
[ '/var/www/vhosts/[^/]*/www(/.*)?',
'/var/www/vhosts/[^/]*/non_public(/.*)?',
+ '/var/www/vhosts/[^/]*/data(/.*)?',
'/var/www/vhosts/[^/]*/g2data(/.*)?',
'/var/www/vhosts/[^/]*/upload(/.*)?' ]:
require => Package['apache'],
diff --git a/manifests/openbsd.pp b/manifests/openbsd.pp
index 095f9ea..96a216a 100644
--- a/manifests/openbsd.pp
+++ b/manifests/openbsd.pp
@@ -46,7 +46,9 @@ class apache::openbsd inherits apache::base {
mode => '0700';
}
- ::apache::vhost::webdir{'default': }
+ ::apache::vhost::webdir{'default':
+ datadir => false,
+ }
Service['apache']{
restart => '/opt/bin/restart_apache.sh',
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 2f381ce..160f638 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -121,7 +121,7 @@ define apache::vhost::php::standard(
engine => 'On',
upload_tmp_dir => "/var/www/upload_tmp_dir/${name}",
'session.save_path' => "/var/www/session.save_path/${name}",
- open_basedir => "${smarty_path}${pear_path}${documentroot}:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}",
+ open_basedir => "${smarty_path}${pear_path}${documentroot}:${real_path}/data:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}",
safe_mode => 'On'
}
if $logmode != 'nologs' {
diff --git a/manifests/vhost/static.pp b/manifests/vhost/static.pp
index a315e05..21b062e 100644
--- a/manifests/vhost/static.pp
+++ b/manifests/vhost/static.pp
@@ -49,6 +49,7 @@ define apache::vhost::static(
owner => $owner,
group => $group,
run_mode => $run_mode,
+ datadir => false,
documentroot_owner => $documentroot_owner,
documentroot_group => $documentroot_group,
documentroot_mode => $documentroot_mode,
diff --git a/manifests/vhost/webdav.pp b/manifests/vhost/webdav.pp
index 5570dcc..f90cf8d 100644
--- a/manifests/vhost/webdav.pp
+++ b/manifests/vhost/webdav.pp
@@ -76,6 +76,7 @@ define apache::vhost::webdav(
owner => $owner,
group => $group,
run_mode => $run_mode,
+ datadir => false,
documentroot_owner => $documentroot_owner,
documentroot_group => $documentroot_group,
documentroot_mode => $documentroot_mode,
diff --git a/manifests/vhost/webdir.pp b/manifests/vhost/webdir.pp
index 1e663e5..e0e2546 100644
--- a/manifests/vhost/webdir.pp
+++ b/manifests/vhost/webdir.pp
@@ -7,6 +7,7 @@ define apache::vhost::webdir(
$mode = 0640,
$run_mode = 'normal',
$manage_docroot = true,
+ $datadir = true,
$documentroot_owner = root,
$documentroot_group = apache,
$documentroot_mode = 0640,
@@ -110,6 +111,14 @@ define apache::vhost::webdir(
mode => $documentroot_mode;
}
}
+ if $datadir {
+ file{"${real_path}/data":
+ ensure => directory,
+ owner => $real_documentroot_owner,
+ group => $real_documentroot_group,
+ mode => '0640';
+ }
+ }
case $::operatingsystem {
centos: { include apache::logrotate::centos::vhosts }
default: { #nothing