To change the Apache MPM on Ubuntu/Debian, run the following commands in the given sequence on the terminal as "root":
- The default PHP in the new hestiacp is 7.3. Disable it because it gives an error with mpm_event.
# a2dismod php7.3
# a2dismod mpm_prefork
# a2enmod mpm_event
- Restart the Apache server. If you have the latest hestiacp, you must have Nginx and PHP-FPM. Restart them too.
# systemctl restart php7.3-fpm.service
# systemctl restart nginx.service
# systemctl restart apache2.service
MPM_event should be active now. Check the Apache MPM using the following command:
# apachectl -V
# a2query -M
Troubleshooting: After switching to mpm_event, if your webpages don't open and you get 500 error ( Internal Server Error), it may be possible that you have both mod_fcgid and mod_ruid2 enabled. To check enabled Apache modules, run the following command:
# ls -l /etc/apache2/mods-enabled/
With mpm_event, the mod_fcgid is not compatible with mod_ruid2, so you need to disable mod_ruid2. Run the following command to disable mod_ruid2 and then restart PHP-FPM, Nginx, and Apache. It should fix the error.
# a2dismod ruid2