summaryrefslogtreecommitdiff
path: root/manifests/vhost/php
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-06-08 12:09:39 -0300
committermh <mh@immerda.ch>2012-06-08 12:09:39 -0300
commit9cbf2fafee3f4623b75d1a6b70458ab097e64924 (patch)
tree82a619d81198ddd49cb5df5f1116281904e08023 /manifests/vhost/php
parentedc2afe65136d49501b6aaeb805269b3f7bb141f (diff)
fix dynamic scope variables, function access
Diffstat (limited to 'manifests/vhost/php')
-rw-r--r--manifests/vhost/php/standard.pp2
-rw-r--r--manifests/vhost/php/webapp.pp13
2 files changed, 14 insertions, 1 deletions
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index b02e05c..bbfebc4 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -178,7 +178,6 @@ define apache::vhost::php::standard(
$real_php_settings = merge($std_php_settings,$php_settings)
- $passing_extension = 'php'
if $ensure != 'absent' {
case $run_mode {
'proxy-itk','static-itk': {
@@ -245,6 +244,7 @@ define apache::vhost::php::standard(
mod_security_rules_to_disable => $mod_security_rules_to_disable,
mod_security_additional_options => $mod_security_additional_options,
use_mod_macro => $use_mod_macro,
+ passing_extension => $passing_extension,
}
}
diff --git a/manifests/vhost/php/webapp.pp b/manifests/vhost/php/webapp.pp
index 3711c1a..54905ca 100644
--- a/manifests/vhost/php/webapp.pp
+++ b/manifests/vhost/php/webapp.pp
@@ -75,6 +75,19 @@ define apache::vhost::php::webapp(
if $manage_config {
if $config_file == 'absent' { fail("No config file defined for ${name} on ${::fqdn}, if you'd like to manage the config, you have to add one!") }
+
+ $real_path = $path ? {
+ 'absent' => $::operatingsystem ? {
+ openbsd => "/var/www/htdocs/${name}",
+ default => "/var/www/vhosts/${name}"
+ },
+ default => $path
+ }
+ if $path_is_webdir {
+ $documentroot = $real_path
+ } else {
+ $documentroot = "${real_path}/www"
+ }
::apache::vhost::file::documentrootfile{"configurationfile_${name}":
documentroot => $documentroot,
filename => $config_file,