From bcb25abcb26f7ebb522f3c0dc3288c6a97ccf158 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 23 Feb 2014 15:17:06 +0100 Subject: introduce a datadir for all dynamic hostings --- manifests/vhost/php/standard.pp | 2 +- manifests/vhost/static.pp | 1 + manifests/vhost/webdav.pp | 1 + manifests/vhost/webdir.pp | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) (limited to 'manifests/vhost') 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 -- cgit v1.2.3