I have been running Virtualmin with NGINX for hosting servers for several years. After doing apt-get upgrade to the server, all the hosts have lost PHP, via FCGI.
Switching to FPM, I am able to get PHP working again, but PHP-FCGI is now broken.
You can replicate the problem on a brand new server that is using Virtualmin with NGINX, and make a phpinfo file. With PHP-FCGI, the phpinfo will show 502 Gateway error (Iâm using CloudFlare). And when I switch to PHP-FPM, the phpinfo works again.
Can anyone advise what has broken with Virtualmin/NGINX PHP-FCGI?
No need for a fresh install. But, relevant error log entries would be absolutely necessary to make any progress. The browser has no useful information about why something failed on the server, we need to see what the server thinks happened.
Also, I assume youâve checked âValidate Virtual Serversâ for errors?
Hereâs the output from Validate Virtual Servers:
Failed to validate servers : virtualmin-nginx::feature_get_web_ssl_file failed : Canât use string (âssl_certificate_keyâ) as an ARRAY ref while âstrict refsâ in use at /usr/share/webmin/virtualmin-nginx/virtualmin-nginx-lib.pl line 210.
That looks like a bug (maybe triggereed by an nginx config thatâs confusing our parser). I seem tor recall someone else reported something similar, but I canât search for it right nowâŠmight be worth doing a search for a bit of that error, though.
We never want remote access. Concerns include lack of time, potential liability, etc. We occasionally break the rule for particularly hard to troubleshoot problems, but, in this case, youâve already posted your nginx config and the error. Thatâs probably all weâd need to seeâŠand Jamie can ask for more, if not.
I have same versions (Debian, VM, etc) as you and got the last upgrade on sunday , I have many sites on it both FPM and FCGI which runs well. The probelm is at install of Virtualmin with NGINX, is not vey well parametered and unstable and you can not stay with only the Virtualmin menus, you have to go in the files:
ex to pass the site âmysiteâ in FPM , you have to remove but
rm: cannot remove âmysite/fcgi-bin/php5.fcgiâ: Operation not permitted
and do
sudo lsattr mysite/fcgi-bin/php7.3.fcgi
----i---------e---- mysite/fcgi-bin/php7.3.fcgi
The file is immutable (cannot be changed, removed etc).
As root user do the following:
chattr -R -i mysite/fcgi-bin/php7.3.fcgi
and then the rm is ok
test on services>PHP-FPM config, edit config manually
with going fetch /etc/php/7.3/fpm/php-fpm.conf and manage it
then /etc/php 7.3/fpm/pool.d file of you site and work on it. This is not obvious in actual VirtualMin version for Nginx !