diff options
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | manifests/config/file.pp | 21 | ||||
-rw-r--r-- | manifests/vhost/php/standard.pp | 9 |
3 files changed, 25 insertions, 6 deletions
@@ -166,7 +166,6 @@ apache::vhost { "$domain": vhost_source => 'modules/site_configs/vhosts.d/${name}.conf" } - There are multiple other additional configurables that you can pass to each vhost definition: diff --git a/manifests/config/file.pp b/manifests/config/file.pp index 29e6736..74d289d 100644 --- a/manifests/config/file.pp +++ b/manifests/config/file.pp @@ -32,9 +32,21 @@ define apache::config::file( group => 0, mode => '0644'; } - if $ensure == 'present' { - case $content { - 'absent': { + + case $ensure { + 'absent', 'purged': { + # We want to avoid all stuff related to source and content + } + 'link': { + if $target != false { + File["apache_${name}"] { + target => $target, + } + } + } + default: { + case $content { + 'absent': { $real_source = $source ? { 'absent' => [ "puppet:///modules/site_apache/${confdir}/${::fqdn}/${name}", @@ -49,7 +61,7 @@ define apache::config::file( default => $source } File["apache_${name}"]{ - source => $real_source, + source => $real_source, } } default: { @@ -78,6 +90,7 @@ define apache::config::file( } } } + } } } } diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp index c34e339..242a47d 100644 --- a/manifests/vhost/php/standard.pp +++ b/manifests/vhost/php/standard.pp @@ -182,11 +182,18 @@ define apache::vhost::php::standard( 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}:${real_path}/data:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}", - safe_mode => 'On', + safe_mode => $::operatingsystem ? { + debian => undef, + default => 'On', + }, error_log => $php_error_log, safe_mode_gid => $safe_mode_gid, safe_mode_exec_dir => $std_php_settings_safe_mode_exec_dir, default_charset => $std_php_settings_default_charset, + open_basedir => has_key($php_options,'additional_open_basedir') ? { + true => "${smarty_path}${pear_path}${documentroot}:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}:${php_options[additional_open_basedir]}", + false => "${smarty_path}${pear_path}${documentroot}:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}", + }, } $real_php_settings = merge($std_php_settings,$php_settings) |