summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/vhost/modperl.pp23
-rw-r--r--manifests/vhost/php/standard.pp24
-rw-r--r--templates/vhosts/default.erb10
-rw-r--r--templates/vhosts/partials/std_override_options.erb2
4 files changed, 46 insertions, 13 deletions
diff --git a/manifests/vhost/modperl.pp b/manifests/vhost/modperl.pp
index 9940286..795df6b 100644
--- a/manifests/vhost/modperl.pp
+++ b/manifests/vhost/modperl.pp
@@ -83,12 +83,25 @@ define apache::vhost::modperl(
mode => $documentroot_mode;
}
- case $run_mode {
- 'proxy-itk','static-itk': {
- $passing_extension = 'pl'
- include ::mod_perl::itk_plus
+ $passing_extension = 'pl'
+ if $ensure != 'absent' {
+ case $run_mode {
+ 'proxy-itk','static-itk': {
+ include ::mod_perl::itk_plus
+ }
+ 'fcgid': {
+ include ::mod_fcgid
+ # we don't need mod_perl if we run it as fcgid
+ include ::mod_perl::disable
+ mod_fcgid::starter {$name:
+ type => 'perl',
+ owner => $run_uid,
+ group => $run_gid,
+ notify => Service['apache'],
+ }
+ }
+ default: { include ::mod_perl }
}
- default: { include ::mod_perl }
}
# create webdir
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 723ae3f..878e55c 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -64,15 +64,25 @@ define apache::vhost::php::standard(
$htpasswd_path = 'absent'
){
- case $run_mode {
- 'proxy-itk','static-itk': {
- $passing_extension = 'php'
- include ::php::itk_plus
+ $passing_extension = 'php'
+ if $ensure != 'absent' {
+ case $run_mode {
+ 'proxy-itk','static-itk': {
+ include ::php::itk_plus
+ }
+ 'itk': { include ::php::itk }
+ 'fcgid': {
+ include ::php::mod_fcgid
+ mod_fcgid::starter {$name:
+ type => 'php',
+ owner => $run_uid,
+ group => $run_gid,
+ notify => Service['apache'],
+ }
+ }
+ default: { include ::php }
}
- 'itk': { include ::php::itk }
- default: { include ::php }
}
-
if $manage_webdir {
# create webdir
::apache::vhost::webdir{$name:
diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb
index 5ab1d26..02dcb5b 100644
--- a/templates/vhosts/default.erb
+++ b/templates/vhosts/default.erb
@@ -19,6 +19,16 @@ vhost_parts.each do |vhost_part|
AssignUserId <%= run_uid+" "+run_gid %>
</IfModule>
+ <% elsif run_mod.to_s == 'fcgid' -%>
+ <IfModule mod_fcgid.c>
+ SuexecUserGroup <%= run_uid+" "+run_gid %>
+ <% if passing_extension.to_s == 'php' -%>
+ PHP_Fix_Pathinfo_Enable 1
+ <% end -%>
+ FCGIWrapper /var/www/mod_fcgid-starters/<%= name %> .<%= passing_extension %>
+ AddHandler fcgid-script .<%= passing_extension %>
+ </IfModule>
+
<% end -%>
<% if ssl_mode == 'force' && vhost_part == :normal -%>
RewriteEngine On
diff --git a/templates/vhosts/partials/std_override_options.erb b/templates/vhosts/partials/std_override_options.erb
index d43b042..845fcc0 100644
--- a/templates/vhosts/partials/std_override_options.erb
+++ b/templates/vhosts/partials/std_override_options.erb
@@ -1,4 +1,4 @@
AllowOverride <%= allow_override %>
<% if options.to_s != 'absent' || do_includes.to_s == 'true' -%>
- Options <%- unless options.to_s == 'absent' then -%><%= options %><% end -%><% if do_includes.to_s == 'true' && !options.include?('+Includes') -%> +Includes<% end -%>
+ Options <%- unless options.to_s == 'absent' then -%><%= options %><% end -%><% if do_includes.to_s == 'true' && !options.include?('+Includes') -%> +Includes<% end -%><% if run_mode == 'fcgid' && !options.include?('+ExecCGI') -%>+ExecCGI<% end -%>
<% end -%> \ No newline at end of file