summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/vhost/php/standard.pp41
1 files changed, 30 insertions, 11 deletions
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 699edeb..e0eb1e6 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -46,6 +46,7 @@ define apache::vhost::php::standard(
$allow_override = 'None',
$php_settings = {},
$php_options = {},
+ $php_installation = 'system',
$do_includes = false,
$options = 'absent',
$additional_options = 'absent',
@@ -61,7 +62,7 @@ define apache::vhost::php::standard(
$vhost_source = 'absent',
$vhost_destination = 'absent',
$htpasswd_file = 'absent',
- $htpasswd_path = 'absent'
+ $htpasswd_path = 'absent',
){
if $manage_webdir {
@@ -121,11 +122,6 @@ define apache::vhost::php::standard(
} else {
$php_error_log = undef
}
- if $run_mode == 'fcgid' {
- $safe_mode_gid = 'On'
- } else {
- $safe_mode_gid = undef
- }
if ('safe_mode_exec_dir' in $php_settings) {
$php_safe_mode_exec_dir = $php_settings[safe_mode_exec_dir]
@@ -183,15 +179,31 @@ define apache::vhost::php::standard(
$the_open_basedir = "${smarty_path}${pear_path}${documentroot}:${real_path}/data:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}"
}
+ if $run_mode == 'fcgid' {
+ $safe_mode_gid = $::operatingsystem ? {
+ debian => undef,
+ default => $php_installation ? {
+ 'system' => 'On',
+ default => undef,
+ }
+ }
+ } else {
+ $safe_mode_gid = undef
+ }
+
+ $safe_mode = $::operatingsystem ? {
+ debian => undef,
+ default => $php_installation ? {
+ 'system' => 'On',
+ default => undef,
+ }
+ }
$std_php_settings = {
engine => 'On',
upload_tmp_dir => "/var/www/upload_tmp_dir/${name}",
'session.save_path' => "/var/www/session.save_path/${name}",
- safe_mode => $::operatingsystem ? {
- debian => undef,
- default => 'On',
- },
error_log => $php_error_log,
+ safe_mode => $safe_mode,
safe_mode_gid => $safe_mode_gid,
safe_mode_exec_dir => $std_php_settings_safe_mode_exec_dir,
default_charset => $std_php_settings_default_charset,
@@ -212,13 +224,20 @@ define apache::vhost::php::standard(
include apache::include::mod_fcgid
mod_fcgid::starter {$name:
- php_tmp_dir => $real_php_settings[php_tmp_dir],
+ tmp_dir => $real_php_settings[php_tmp_dir],
cgi_type => 'php',
cgi_type_options => delete($real_php_settings, php_tmp_dir),
owner => $run_uid,
group => $run_gid,
notify => Service['apache'],
}
+ if $php_installation == 'scl54' {
+ require php::scl::php54
+ Mod_fcgid::Starter[$name]{
+ binary => '/opt/rh/php54/root/usr/bin/php-cgi',
+ additional_cmds => 'source /opt/rh/php54/enable',
+ }
+ }
}
default: { include ::php }
}