From e99a22ee68e0ce19c397688901a4170d295fb9b9 Mon Sep 17 00:00:00 2001 From: Thom Pol <> Date: Mon, 22 Feb 2021 20:03:20 +0100 Subject: [PATCH] Disable php8.0 so mpm_event can be used (#11 and 28) --- lib/os/class.ISPConfigDebianOS.inc.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/os/class.ISPConfigDebianOS.inc.php b/lib/os/class.ISPConfigDebianOS.inc.php index 3085d13..6c1bdac 100644 --- a/lib/os/class.ISPConfigDebianOS.inc.php +++ b/lib/os/class.ISPConfigDebianOS.inc.php @@ -157,6 +157,12 @@ class ISPConfigDebianOS extends ISPConfigBaseOS { return $packages; } + protected function getApacheModulesToDisable() { + $modules = array('php8.0', 'mpm_prefork'); + + return $modules; + } + protected function getApacheModulesToEnable() { $modules = array('suexec', 'rewrite', 'ssl', 'actions', 'include', 'dav_fs', 'dav', 'auth_digest', 'cgi', 'headers', 'proxy_fcgi', 'alias', 'http2', 'mpm_event'); @@ -851,15 +857,15 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"'; $this->installPackages($packages); if(ISPConfig::shallInstall('web') && ISPConfig::$WEBSERVER === ISPC_WEBSERVER_APACHE) { - // Disable mpm_prefork so mpm_event can be used with http2 - ISPConfigLog::info('Disabling mpm_prefork module.', true); - $modules = 'mpm_prefork'; - $cmd = 'a2dismod ' . $modules . ' 2>&1'; + // Disable conflicting modules so mpm_event can be used with http2 + ISPConfigLog::info('Disabling conflicting apache modules.', true); + $modules = $this->getApacheModulesToDisable(); + $cmd = 'a2dismod ' . implode(' ', $modules) . ' 2>&1'; $result = $this->exec($cmd); if($result === false) { throw new ISPConfigOSException('Command ' . $cmd . ' failed.'); } - + ISPConfigLog::info('Enabling apache modules.', true); $modules = $this->getApacheModulesToEnable(); $cmd = 'a2enmod ' . implode(' ', $modules) . ' 2>&1'; -- GitLab