You have misread that page (and somehow also misquoted it?). Nowhere on that page is
mod_php recommended, and it has never been recommended by us. One of our first major projects for Virtualmin when we started the company (rather than it being a project for fun) was getting suexec+fcgid working with PHP in a seamless and easy manner. If you ever find any doc or post with me recommending
mod_php, odds are very good you have misunderstood it. It has been my life’s mission for the past decade or more to convince Virtualmin users that they do not need, and should not want, to use
mod_php for anything.
The actual quote from that page:
Virtualmin, by default, configures all scripts, including PHP, to execute as the owner of the virtual server account via the usage of suexec. This precludes the use of mod_php, and takes the place of hacks like suphp. Because execution of PHP as a CGI script can be slower than mod_php, Virtualmin makes use of mod_fcgid which allows PHP scripts to exist as long-running processes. This leads to PHP execution speed on par with running under mod_php while still providing a level of security only available to scripts running under suexec.
I think (hope?) it is pretty clear that this is not recommending mod_php, and is instead telling you what Virtualmin does by default instead (and it is still mostly accurate, though php-fpm is superior for most users and is now recommended for most users…though I think the majority of our supporting distros are still gonna get suexec_fcgid by default and will only get php-fpm if they choose it (and they should). CentOS 8 is php-fpm only for the time being, though CGI is kinda coming back it does not make sense to use it for PHP apps.
Edit: To be clear, yes, the doc is old, but it does not recommend
mod_php and never has. And, despite being several years old, it’s still mostly accurate (suexec+fcgid is still a reasonable choice, and is the default for a lot of supported distros)…it just didn’t know about php-fpm. We’ll update it as soon as we have some free time.