Failed : Apache virtual host was not found

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.5
Webmin version 2.111
Virtualmin version 7.10.0
Webserver version Apache 2.4.41-4ubuntu3.23
Related packages php-fpm8.3

For some odd reason, I found that my server PHP script execution mode is set to Disabled. Trying to switch to FPM, I get this error upon saving:

Changing PHP execution mode to FPM ..
.. change failed : Apache virtual host was not found

How do I fix that?

Edit:
Upon validating the virtual server, I got this:

— Apache website : No Apache virtual host for *** found
— Apache SSL website : No SSL Apache virtual host for *** found
— Log file rotation : No webserver log found for virtual host ***

Even though the apache config is valid

What do you see in Enabled Features on the Edit Virtual Server page for this virtual server (domain)? Don’t change anything yet, we’re just trying to figure out what’s gone wrong.

And, when you say the “apache config is valid” what does that mean? Have you confirmed there are two VirtualHost sections for this domain? Are they enabled? (Ubuntu/Debian have a sites-available and sites-enabled directory, which do what the name suggest and there are tools for managing links in sites-enabled to enable/disable VirtualHosts.)