Page 1 of 1

My apache2 can't startup.

Posted: Mon 24. Nov 2025, 01:56
by akong77
My current problem is that the boot process of a host machine has crashed, but the keyhelp data within it is intact. I performed a full backup in April of this year, restored it to another host, and then used a live CD to boot and back up the keyhelp database and the entire /etc folder. I then transferred these backups to the restored host, overwriting the database and /etc folders.

After overwriting the database and /etc folders and restarting the database service, I saw the new data. However, when I restart the apache2 service, the following error occurs:

The job for apache2.service failed because the control process exited with an error code. See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details. I checked the log and found the error:

AH00534: apache2: Configuration error: More than one MPM loaded.

Action 'configtest' failed. I searched online for tutorials, which instructed me to use `a2dismod mpm_prefork`. After executing this, I encountered the error:

ERROR: The following modules depend on mpm_prefork and need to be disabled first: php8.2. So I executed:

`a2dismod php8.2`, then `a2dismod mpm_prefork`, and finally `a2enmod mpm_event`.

The apache2 service is temporarily up, but I can't install new PHP versions in the Keyhelp system, and all websites show an exclamation mark status. Although the websites are temporarily usable, this is abnormal. How can I resolve this?

Re: My apache2 can't startup.

Posted: Mon 24. Nov 2025, 02:49
by akong77
Hello
Later, I executed the following commands:

a2dismod mpm_event
a2enmod mpm_prefork
a2enmod php8.2
systemctl restart apache2.service
systemctl status apache2.service

Finally, I executed keyhelp-toolbox and overwrote apache2. It worked for now. I'll check it again. Thank you.

Re: My apache2 can't startup.

Posted: Mon 24. Nov 2025, 10:06
by Alexander
Hello,

Just an info, to be in line with the default settings. You should:

- Disable mod php
- You should manage the mpm setting via the KeyHelp settings (Configuration -> Webserver)
- In case you get errors installing PHP interpreter, check the "System Status -> Event logs" or "System Status -> Protocols -> repo_update.log" or /var/log/keyhelp/php-error.log for an error message, so one can further investigate, what is the cause