From: Tom Hughes Date: Mon, 18 May 2020 14:47:48 +0000 (+0100) Subject: Make sure we use prefork with mod_php X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/9430f8a86c3e8e4b34a1f20f8c9cf00db5a1d7ec Make sure we use prefork with mod_php --- diff --git a/cookbooks/dmca/attributes/default.rb b/cookbooks/dmca/attributes/default.rb new file mode 100644 index 000000000..56bdf2134 --- /dev/null +++ b/cookbooks/dmca/attributes/default.rb @@ -0,0 +1,2 @@ +# Use prefork as PHP is to dumb for anything else +override[:apache][:mpm] = "prefork" diff --git a/cookbooks/donate/attributes/default.rb b/cookbooks/donate/attributes/default.rb index c6c3785d6..b41666c72 100644 --- a/cookbooks/donate/attributes/default.rb +++ b/cookbooks/donate/attributes/default.rb @@ -1,2 +1,5 @@ # Enable the "donate" role default[:accounts][:users][:donate][:status] = :role + +# Use prefork as PHP is to dumb for anything else +override[:apache][:mpm] = "prefork" diff --git a/cookbooks/forum/attributes/default.rb b/cookbooks/forum/attributes/default.rb index 9f4114f80..d6beb41d2 100644 --- a/cookbooks/forum/attributes/default.rb +++ b/cookbooks/forum/attributes/default.rb @@ -1,2 +1,5 @@ # Enable the "forum" role default[:accounts][:users][:forum][:status] = :role + +# Use prefork as PHP is to dumb for anything else +override[:apache][:mpm] = "prefork" diff --git a/cookbooks/mediawiki/attributes/default.rb b/cookbooks/mediawiki/attributes/default.rb index 221a4eb9a..a7eab3291 100644 --- a/cookbooks/mediawiki/attributes/default.rb +++ b/cookbooks/mediawiki/attributes/default.rb @@ -4,6 +4,9 @@ default[:apt][:sources] = node[:apt][:sources] | ["mediawiki"] # Default to enabling the "wiki" role default[:accounts][:users][:wiki][:status] = :role +# Use prefork as PHP is to dumb for anything else +override[:apache][:mpm] = "prefork" + # Set mediawiki defaults default[:mediawiki][:user] = "wiki" default[:mediawiki][:group] = "wiki" diff --git a/cookbooks/php/attributes/default.rb b/cookbooks/php/attributes/default.rb index 0ca636813..d1bd6680a 100644 --- a/cookbooks/php/attributes/default.rb +++ b/cookbooks/php/attributes/default.rb @@ -3,3 +3,5 @@ default[:php][:version] = if node[:lsb][:release].to_f < 20.04 else "7.4" end + +override[:apache][:mpm] = "prefork" diff --git a/cookbooks/php/recipes/apache.rb b/cookbooks/php/recipes/apache.rb index 62cf24d66..7add78383 100644 --- a/cookbooks/php/recipes/apache.rb +++ b/cookbooks/php/recipes/apache.rb @@ -17,8 +17,6 @@ # limitations under the License. # -node.override[:apache][:mpm] = "prefork" - include_recipe "php" include_recipe "apache" diff --git a/cookbooks/piwik/attributes/default.rb b/cookbooks/piwik/attributes/default.rb index e8366f229..9115878d1 100644 --- a/cookbooks/piwik/attributes/default.rb +++ b/cookbooks/piwik/attributes/default.rb @@ -11,3 +11,5 @@ default[:piwik][:plugins] = %w[ VisitFrequency VisitorInterest VisitsSummary VisitTime WebsiteMeasurable Widgetize ] + +override[:apache][:mpm] = "prefork" diff --git a/cookbooks/wordpress/attributes/default.rb b/cookbooks/wordpress/attributes/default.rb index 9233459dc..856c99696 100644 --- a/cookbooks/wordpress/attributes/default.rb +++ b/cookbooks/wordpress/attributes/default.rb @@ -1,6 +1,9 @@ # Enable the "wordpress" role default[:accounts][:users][:wordpress][:status] = :role +# Use prefork as PHP is to dumb for anything else +override[:apache][:mpm] = "prefork" + # Set wordpress defaults default[:wordpress][:user] = "wordpress" default[:wordpress][:group] = "wordpress"