summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-10-08 23:44:15 +0200
committermh <mh@immerda.ch>2011-10-08 23:44:15 +0200
commit968676d43da076d4ecc9d33c4a5f8a2fb532285c (patch)
tree89f8795c5079e06fdb0f391e3b787e83cbd512af
parent85a551f74b55a838fe3f4fa63bc104f74605f3d4 (diff)
pass php_settings to fcgid-starter and only set them in vhost, if we don't run as fgcid
-rw-r--r--manifests/vhost/php/standard.pp42
-rw-r--r--templates/vhosts/partials/php_settings.erb26
2 files changed, 36 insertions, 32 deletions
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 4b01d32..7de2798 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -64,26 +64,6 @@ define apache::vhost::php::standard(
$htpasswd_path = 'absent'
){
- $passing_extension = 'php'
- if $ensure != 'absent' {
- case $run_mode {
- 'proxy-itk','static-itk': {
- include ::php::itk_plus
- }
- 'itk': { include ::php::itk }
- 'fcgid': {
- include ::mod_fcgid
- include ::php::mod_fcgid
- mod_fcgid::starter {$name:
- cgi_type => 'php',
- owner => $run_uid,
- group => $run_gid,
- notify => Service['apache'],
- }
- }
- default: { include ::php }
- }
- }
if $manage_webdir {
# create webdir
::apache::vhost::webdir{$name:
@@ -188,6 +168,28 @@ 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': {
+ include ::php::itk_plus
+ }
+ 'itk': { include ::php::itk }
+ 'fcgid': {
+ include ::mod_fcgid
+ include ::php::mod_fcgid
+ mod_fcgid::starter {$name:
+ cgi_type => 'php',
+ cgi_type_options => $real_php_settings,
+ owner => $run_uid,
+ group => $run_gid,
+ notify => Service['apache'],
+ }
+ }
+ default: { include ::php }
+ }
+ }
+
::apache::vhost::phpdirs{"${name}":
ensure => $ensure,
php_upload_tmp_dir => $real_php_settings[upload_tmp_dir],
diff --git a/templates/vhosts/partials/php_settings.erb b/templates/vhosts/partials/php_settings.erb
index 8d4fec4..acc81f7 100644
--- a/templates/vhosts/partials/php_settings.erb
+++ b/templates/vhosts/partials/php_settings.erb
@@ -1,17 +1,19 @@
-<% php_settings.each do |key,value|
- dvalue = value.to_s.downcase
- munged_value = if dvalue == 'true'
- 'on'
- elsif dvalue == 'false'
- 'off'
- elsif ['on','off'].include?(dvalue)
- dvalue
- else
- value
- end
- if ['on','off' ].include?(munged_value) -%>
+<% if run_mode != 'fcgid'
+ php_settings.each do |key,value|
+ dvalue = value.to_s.downcase
+ munged_value = if dvalue == 'true'
+ 'on'
+ elsif dvalue == 'false'
+ 'off'
+ elsif ['on','off'].include?(dvalue)
+ dvalue
+ else
+ value
+ end
+ if ['on','off' ].include?(munged_value) -%>
php_admin_flag <%= key %> <%= munged_value %>
<% else -%>
php_admin_value <%= key %> <%= munged_value %>
<% end -%>
+<% end -%>
<% end -%> \ No newline at end of file