From cac6ace6749429cdc77d0f1c0bac4890838d0861 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 13 Jul 2020 19:20:41 +0100 Subject: [PATCH] Drop mod_php support --- cookbooks/dmca/recipes/default.rb | 2 +- cookbooks/donate/recipes/default.rb | 2 +- cookbooks/forum/recipes/default.rb | 2 +- cookbooks/mediawiki/recipes/default.rb | 2 +- cookbooks/php/recipes/apache-fpm.rb | 28 -------------------------- cookbooks/php/recipes/apache.rb | 11 ++++++---- cookbooks/piwik/recipes/default.rb | 2 +- cookbooks/wordpress/recipes/default.rb | 2 +- 8 files changed, 13 insertions(+), 38 deletions(-) delete mode 100644 cookbooks/php/recipes/apache-fpm.rb diff --git a/cookbooks/dmca/recipes/default.rb b/cookbooks/dmca/recipes/default.rb index 4190ef3cb..c0bd959a6 100644 --- a/cookbooks/dmca/recipes/default.rb +++ b/cookbooks/dmca/recipes/default.rb @@ -18,7 +18,7 @@ # include_recipe "apache" -include_recipe "php::apache-fpm" +include_recipe "php::apache" directory "/srv/dmca.openstreetmap.org" do owner "root" diff --git a/cookbooks/donate/recipes/default.rb b/cookbooks/donate/recipes/default.rb index d67ad5b8c..1c36bfb1e 100644 --- a/cookbooks/donate/recipes/default.rb +++ b/cookbooks/donate/recipes/default.rb @@ -21,7 +21,7 @@ include_recipe "accounts" include_recipe "apache" include_recipe "git" include_recipe "mysql" -include_recipe "php::apache-fpm" +include_recipe "php::apache" package %w[ php-cli diff --git a/cookbooks/forum/recipes/default.rb b/cookbooks/forum/recipes/default.rb index 06929ec3e..80694cf50 100644 --- a/cookbooks/forum/recipes/default.rb +++ b/cookbooks/forum/recipes/default.rb @@ -21,7 +21,7 @@ include_recipe "accounts" include_recipe "apache" include_recipe "git" include_recipe "mysql" -include_recipe "php::apache-fpm" +include_recipe "php::apache" cache_dir = Chef::Config[:file_cache_path] diff --git a/cookbooks/mediawiki/recipes/default.rb b/cookbooks/mediawiki/recipes/default.rb index 2977b5c42..7dd28bb4e 100644 --- a/cookbooks/mediawiki/recipes/default.rb +++ b/cookbooks/mediawiki/recipes/default.rb @@ -23,7 +23,7 @@ include_recipe "apt" include_recipe "git" include_recipe "memcached" include_recipe "mysql" -include_recipe "php::apache-fpm" +include_recipe "php::apache" # Mediawiki Base Requirements package %w[ diff --git a/cookbooks/php/recipes/apache-fpm.rb b/cookbooks/php/recipes/apache-fpm.rb deleted file mode 100644 index 17ea43e9b..000000000 --- a/cookbooks/php/recipes/apache-fpm.rb +++ /dev/null @@ -1,28 +0,0 @@ -# -# Cookbook:: php -# Recipe:: apache-fpm -# -# Copyright:: 2020, OpenStreetMap Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -include_recipe "apache" -include_recipe "php::fpm" - -apache_module "proxy" -apache_module "proxy_fcgi" - -apache_conf "php#{node[:php][:version]}-fpm" do - action :enable -end diff --git a/cookbooks/php/recipes/apache.rb b/cookbooks/php/recipes/apache.rb index 62cf24d66..ead6a5f73 100644 --- a/cookbooks/php/recipes/apache.rb +++ b/cookbooks/php/recipes/apache.rb @@ -17,9 +17,12 @@ # limitations under the License. # -node.override[:apache][:mpm] = "prefork" - -include_recipe "php" include_recipe "apache" +include_recipe "php::fpm" + +apache_module "proxy" +apache_module "proxy_fcgi" -apache_module "php#{node[:php][:version]}" +apache_conf "php#{node[:php][:version]}-fpm" do + action :enable +end diff --git a/cookbooks/piwik/recipes/default.rb b/cookbooks/piwik/recipes/default.rb index 3b7a40057..990e1c33e 100644 --- a/cookbooks/piwik/recipes/default.rb +++ b/cookbooks/piwik/recipes/default.rb @@ -20,7 +20,7 @@ include_recipe "apache" include_recipe "geoipupdate" include_recipe "mysql" -include_recipe "php::apache-fpm" +include_recipe "php::apache" passwords = data_bag_item("piwik", "passwords") diff --git a/cookbooks/wordpress/recipes/default.rb b/cookbooks/wordpress/recipes/default.rb index df4500037..800d3c600 100644 --- a/cookbooks/wordpress/recipes/default.rb +++ b/cookbooks/wordpress/recipes/default.rb @@ -22,7 +22,7 @@ include_recipe "apache" include_recipe "fail2ban" include_recipe "git" include_recipe "mysql" -include_recipe "php::apache-fpm" +include_recipe "php::apache" package %w[ subversion -- 2.43.2