Virtualmin uses invalid php-cgi path for PHP 7 and above

After installing PHP 7.3 via the sury package (, Virtualmin recognises the new version (PHP 5.6 is standard with this distribution.)

However, when using the FCGId PHP script execution mode in the Website Options section, per default, it will not work, leading to 500 errors like these:

[core:error] [pid 19302] [client] End of script output before headers: php.php
[fcgid:warn] [pid 19303] (104)Connection reset by peer: [client] mod_fcgid: error reading data from FastCGI server

To fix this, one can follow this guide ( to change the PHP execution path from /usr/bin/php7.3 to /usr/bin/php-cgi7.3

One thing to note is that on my server, the PHP 5.6 script has it correctly and references the right PHP CGI binary (/usr/bin/php5-cgi)

This should be done per default, since otherwise this introduces a new manual task to be done every time a new Virtual Server is created.



Is there a command named something like php-fpm7.3 or similar? That's what Virtualmin looks for in FPM mode.