Commit e99a22ee authored by Thom Pol's avatar Thom Pol

Disable php8.0 so mpm_event can be used (#11 and 28)

parent 4cd75e5e
......@@ -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';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment