summaryrefslogtreecommitdiff
path: root/manifests/vhost/php
diff options
context:
space:
mode:
authorAndreas <andreas@immerda.ch>2009-11-18 18:43:30 +0100
committerAndreas <andreas@immerda.ch>2009-11-18 18:43:30 +0100
commit8a30f43b186e967421fd550aa117a56dda869938 (patch)
tree1e4f9178b3e4c2045c32ce45222300a83cc9d253 /manifests/vhost/php
parent211812c875cf0d6bfbf96d30b23ecaed7aee1fb3 (diff)
renames and proc move from webhosting for php_safe_mode_exec_bins
Diffstat (limited to 'manifests/vhost/php')
-rw-r--r--manifests/vhost/php/standard.pp23
-rw-r--r--manifests/vhost/php/typo3.pp14
-rw-r--r--manifests/vhost/php/webapp.pp17
3 files changed, 36 insertions, 18 deletions
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 00a5216..6efba2a 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -22,7 +22,6 @@ define apache::vhost::php::standard(
$run_uid = 'absent',
$run_gid = 'absent',
$allow_override = 'None',
- $php_bin_dir = 'absent',
$php_upload_tmp_dir = 'absent',
$php_session_save_path = 'absent',
$php_use_smarty = false,
@@ -39,12 +38,14 @@ define apache::vhost::php::standard(
$vhost_source = 'absent',
$vhost_destination = 'absent',
$htpasswd_file = 'absent',
- $htpasswd_path = 'absent'
+ $htpasswd_path = 'absent',
+ $php_safe_mode_exec_bins = 'absent',
+ $php_safe_mode_exec_bin_dir = 'absent'
){
::apache::vhost::phpdirs{"${name}":
ensure => $ensure,
- php_bin_dir => $php_bin_dir,
+ php_safe_mode_exec_bin_dir => $php_safe_mode_exec_bin_dir,
php_upload_tmp_dir => $php_upload_tmp_dir,
php_session_save_path => $php_session_save_path,
documentroot_owner => $documentroot_owner,
@@ -54,6 +55,20 @@ define apache::vhost::php::standard(
run_uid => $run_uid,
}
+ if $php_safe_mode_exec_bins != 'absent' {
+ file{$php_safe_mode_exec_bin_dir:
+ ensure => directory,
+ source => "puppet://$server/modules/common/empty",
+ recurse => true,
+ purge => true,
+ owner => $owner, group => $group, mode => 0750;
+ }
+ $php_safe_mode_exec_bins_subst = regsubst($php_safe_mode_exec_bins,"(.+)","${vhost}_\\1")
+ apache::vhost::php::safe_mode_bin{ $php_safe_mode_exec_bins_subst:
+ path => $php_safe_mode_exec_bin_dir
+ }
+ }
+
if $php_use_smarty {
include php::extensions::smarty
}
@@ -92,7 +107,7 @@ define apache::vhost::php::standard(
options => $options,
additional_options => $additional_options,
default_charset => $default_charset,
- php_bin_dir => $php_bin_dir,
+ php_safe_mode_exec_bin_dir => $php_safe_mode_exec_bin_dir,
php_upload_tmp_dir => $php_upload_tmp_dir,
php_session_save_path => $php_session_save_path,
php_use_smarty => $php_use_smarty,
diff --git a/manifests/vhost/php/typo3.pp b/manifests/vhost/php/typo3.pp
index dcc10bc..ccca1f8 100644
--- a/manifests/vhost/php/typo3.pp
+++ b/manifests/vhost/php/typo3.pp
@@ -19,7 +19,6 @@ define apache::vhost::php::typo3(
$run_uid = 'absent',
$run_gid = 'absent',
$allow_override = 'None',
- $php_bin_dir = 'absent',
$php_upload_tmp_dir = 'absent',
$php_session_save_path = 'absent',
$do_includes = false,
@@ -35,7 +34,8 @@ define apache::vhost::php::typo3(
$htpasswd_path = 'absent',
$manage_config = true,
$config_webwriteable = false,
- $manage_directories = true
+ $manage_directories = true,
+ $php_safe_mode_exec_bins = 'absent'
){
$documentroot = $path ? {
'absent' => $operatingsystem ? {
@@ -45,14 +45,6 @@ define apache::vhost::php::typo3(
default => "${path}/www"
}
- $php_bin_dir = $path ? {
- 'absent' => $operatingsystem ? {
- openbsd => "/var/www/htdocs/${name}/bin",
- default => "/var/www/vhosts/${name}/bin"
- },
- default => "${path}/bin"
- }
-
# create vhost configuration file
::apache::vhost::php::webapp{$name:
ensure => $ensure,
@@ -70,7 +62,6 @@ define apache::vhost::php::typo3(
run_uid => $run_uid,
run_gid => $run_gid,
allow_override => $allow_override,
- php_bin_dir => $php_bin_dir,
php_upload_tmp_dir => $php_upload_tmp_dir,
php_session_save_path => $php_session_save_path,
do_includes => $do_includes,
@@ -104,6 +95,7 @@ define apache::vhost::php::typo3(
"$documentroot/fileadmin/_temp_"
],
manage_config => $manage_config,
+ php_safe_mode_exec_bins => $php_safe_mode_exec_bins,
}
}
diff --git a/manifests/vhost/php/webapp.pp b/manifests/vhost/php/webapp.pp
index 4abb63c..4edc069 100644
--- a/manifests/vhost/php/webapp.pp
+++ b/manifests/vhost/php/webapp.pp
@@ -22,7 +22,6 @@ define apache::vhost::php::webapp(
$run_uid = 'absent',
$run_gid = 'absent',
$allow_override = 'None',
- $php_bin_dir = 'absent',
$php_upload_tmp_dir = 'absent',
$php_session_save_path = 'absent',
$do_includes = false,
@@ -40,7 +39,8 @@ define apache::vhost::php::webapp(
$config_file = 'absent',
$config_webwriteable = false,
$manage_directories = true,
- $managed_directories = 'absent'
+ $managed_directories = 'absent',
+ $php_safe_mode_exec_bins = 'absent'
){
if ($ensure != 'absent') {
if $manage_directories and ($managed_directories != 'absent') {
@@ -71,6 +71,16 @@ define apache::vhost::php::webapp(
}
}
+ if $php_safe_mode_exec_bins and ($php_safe_mode_exec_bins != 'absent') {
+ $php_safe_mode_exec_bin_dir = $path ? {
+ 'absent' => $operatingsystem ? {
+ openbsd => "/var/www/htdocs/${name}/bin",
+ default => "/var/www/vhosts/${name}/bin"
+ },
+ default => "${path}/bin"
+ }
+ }
+
# create vhost configuration file
::apache::vhost::php::standard{$name:
ensure => $ensure,
@@ -90,7 +100,6 @@ define apache::vhost::php::webapp(
run_uid => $run_uid,
run_gid => $run_gid,
allow_override => $allow_override,
- php_bin_dir => $php_bin_dir,
php_upload_tmp_dir => $php_upload_tmp_dir,
php_session_save_path => $php_session_save_path,
do_includes => $do_includes,
@@ -104,6 +113,8 @@ define apache::vhost::php::webapp(
vhost_destination => $vhost_destination,
htpasswd_file => $htpasswd_file,
htpasswd_path => $htpasswd_path,
+ php_safe_mode_exec_bins => $php_safe_mode_exec_bins,
+ php_safe_mode_exec_bin_dir => $php_safe_mode_exec_bin_dir,
}
}