I switched to fCGI. I don’t want to mess with workarounds.
Sorry I inadvertently marked it private. You can read it now.
I think there is some problem with the FPM version detection and the ‘port clash for PHP-FPM’ test that causes any update or ‘Re-check Configuration’ to change the FPM port number of each website. I have only one FPM version installed (7.2.3
), but Virtualmin detects it as two:
The following PHP-FPM versions are available on this system : 7.2 7.2.3
The it changes the perfectly good and correct port numbers, breaking all the website. My example is below.
I have a fresh vanilla install of Virtualmin 6.07 on Ubuntu 18.04 with just one version of PHP (7.2.19) with PHP-FPM (7.2.3). It works fine until I run ‘Re-check Configuration’ and after that all PHP-FPM sites are broken.
Initially all is fine, the website config says:
<FilesMatch .php$>
SetHandler proxy:fcgi://localhost:8000
and /etc/php/7.2/fpm/pool.d/12345678901234.conf says:
listen = 8000
The website works great. Life is good. But every we time I run ‘Re-Check Configuration’ it says the following and all the PHP sites stop working:
The following PHP versions are available : 7.2.19 (/usr/bin/php-cgi7.2)
The following PHP-FPM versions are available on this system : 7.2 7.2.3
Fixing port clash for PHP-FPM version 7.2.3
Fixing port clash for PHP-FPM version 7.2.3
Restarting PHP-FPM server …
… done
Now the website config still says:
<FilesMatch .php$>
SetHandler proxy:fcgi://localhost:8000
But virtualmin has changed /etc/php/7.2/fpm/pool.d/12345678901234.conf to a different port!
listen = 8001
If I run ‘Re-Check Configuration’ it changes it to port 8002, and so on. Every time it changes the PHP-FPM port but does not update the website config.
If I manually change 800X back to 8000 and restart php-fpm that the website works again.
Seems like the FPM version check and ‘port clash for PHP-FPM’ clash detection is buggy?
This looks like the bug report, apparently fix will be to stop changing the port numbers:
https://github.com/virtualmin/virtualmin-gpl/issues/96
I was able to go into the apache configuration for the website and remove this line SetHandler proxy:fcgi://localhost:8001 at that point I could then go into website options and change it to fpm or fcgid
has this been fixed at all yet?
I just had to perform a system reboot (after a kernel update to debian 9), and i put this reboot off for a while…after rebooting, the newest of my client wordpress websites went down with the following error in virtualmin>Logs and reports>apache error log
[proxy:error] [pid 1342:tid 140691015382784] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:8011 (*) failed
not sure if the following has any relevance but i saw it on another forum post about this kind of error
netstat -tulpn | grep 8011
tcp6 0 0 :::8011 :::* LISTEN 3388/php-fpm: maste
this time, it appears that only one of the virtual servers php websites on my system went offline…the newest one (pain in the butt really because thats hardly a good look when a new client comes on board).
Also, all i had to do to get website backup again was goto Virtualmin>Server Configuration>Website Options and then simply click save (which restarted php-fpm for said website and it immediately came back online)
Perhaps there is some caching on other sites and not on new website…and i simply didnt wait long enough after reboot before checking wordpress websites to see if they were working or not?