I'm trying to begin using PHP-FPM as a replacement for FCGID/mod_fcgid on our Virtualmin Professional 6.07 system running on CentOS 7, but am having a problem getting Virtualmin to recognize that PHP-FPM support is available.
I've compiled PHP 7.2.22 from source with a prefix of /opt/rh/php72 and with the --enable-fpm option passed to the configure command. I've even put a php-fpm.conf file in /opt/rh/php72/root/etc and a www.conf file in the same directory. But when I use Virtualmin's "Re-check Configuration" tool, I always get the message that "No PHP-FPM packages were found on this system." Virtualmin does, however, successfully detect PHP 7.2.
I also created a service file in /usr/lib/systemd/system/php-fpm.service and started the /opt/rh/php72/sbin/php-fpm daemon (by way of the service file) before re-checking the configuration again, to no avail.
I don't have any PHP or PHP-FPM "packages" installed through YUm as I would rather compile PHP from source. How can I get Virtualmin to recognize PHP-FPM even if it wasn't installed from a package?
Comments
Submitted by andreychek on Mon, 09/09/2019 - 10:55 Comment #1
Howdy -- thanks for contacting us!
Sorry, reviewing the code for this, it does appear that it's looking for a PHP FPM rpm package.
So you could use a manually compiled version of PHP, but in that case you'd need to use FCGID or CGI.
Alternatively, if you want PHP-FPM, you'd need to use an RPM for that.
Submitted by JEMEDIACORP on Mon, 09/09/2019 - 11:04 Pro Licensee Comment #2
Hi,
Is there any way to "fool" Virtualmin into thinking a PHP-FPM package is installed when in reality PHP-FPM is coming from the compiled PHP installation and its PHP-FPM binary in /opt/rh/php72/sbin/php-fpm?
Submitted by JamieCameron on Tue, 09/10/2019 - 23:07 Comment #3
Unfortunately not - right now, FPM is detected only via which packages are installed.
Submitted by JEMEDIACORP on Tue, 09/10/2019 - 23:14 Pro Licensee Comment #4
Pardon my ignorance of RPM/YUM, but is it possible for me to build a sort of "dummy package" that meets the specifications Virtualmin is looking for (i.e. is named "php7-fpm" or whatever) but that would install or somehow point to the PHP-FPM binaries and other files used by my custom compiled version of PHP in /opt/rh/php72? I know you said Virtualmin is looking for a package, so is there a way I could build a package that will satisfy it rather than using one installed from an existing repository?
Submitted by JeremyHorland on Wed, 07/22/2020 - 23:40 Pro Licensee Comment #5
Boosting this.
Just returned to virtualmin community - hi all.
Looking for a way to enable FPM also for compiled in FPM pools
There are no packages or ports to add on FreeBSD - would like to offer FPM pools via virtualmin