A while ago I enabled HTTP/2 and thought it worked, until I saw this in the Apache error log file:
[Fri Mar 17 12:53:15.370636 2023] [http2:warn] [pid 42376] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
There is a wealth of information on the internet regarding MDM and basically it appears MDM-prefork is incompatible with Apache and HTTP2.
What’s not entirely clear, considering I want to run PHP-FPM and the “latest PHP”, what to choose below?
Any tips?
Can I deselect mdm_prefork and select both mdm_event and mdm_worker?
I found this good reference but still unsure after reading many of the posts:
Thanks @tpnsolutions so much for the reply. I get your point that you prefer event to worker. However, not so easy on our legacy server.
You can enable a new mdm method in the Webmin UI but it just stays on prefork.
Upon closer inspection it appears the problem has to do with a dependency chain which can be seen by running this from the command line:
a2enmod php8.2
Considering dependency mpm_prefork for php8.2:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.2:
Enabling module php8.2.
So essentially I need to understand what else to disable and enable and I have to find legacy sites that are using these things so that I can migrate them to the the new thing.
That seems to imply that you are enabling “mod_php” which you should NEVER do.
Aha thanks! I wasn’t sure that a2enmod php8.2 was mod_php but now I know.
This is a legacy server. Some of the sites are ten+ years old. When I disable mod_php things start falling over on a grand scale, and I believe the last time I check it was something like redundant php_admin_flag flags or something lying around in a few of the approximately 300 sites on the server.
So I’ll do this at 3AM. I’ve remove mod_php again, and see what falls over, and one by one eliminate the sites.
Thanks again, this is progress.
One last question, do you agree with this as a really good configuration:
HTTP/2
PHP-FPM
mdm_event
Considering a server with about 300 sites, but only about 15 or so being regularly accessed?
Remember, you may need to make adjustments to some sites if they are used to using mod_php and/or an older version of PHP since newer versions of PHP do have some breaking changes.
So be sure to audit each site, and check the error logs either at:
/var/log/virtualmin/domain.com_error_log
or if enabled:
/home/domain.com/logs/php_log
*** swap “domain.com” in the first example with the actual domain, and “domain.com” in the second example with the proper domain or username depending on how your environment is setup ***