Fcgi & FCGI issues on Ubuntu / Debian
When changing to FCGI or CGI, if php downloads,
go to conf file and comment phpadmin flag line
php_admin_value engine Off
#php_admin_value engine Off
When FCGI troubleshooting flops and only Apache handler can be used.
Then try php-fpm because it can run the program as user this way we can save time for changing ownership each time from user to Apache and vice versa.
when install php-fpm
you have start service. upto latest version of virtualmin only one running version of php-fpm can be used.
A proper fpm work require addition add proxy_fcgi module
After installing make sure to goto virtualmin and make it detect
virtualmin -> system configuration -> Re-check configuration
After changing FCGI or CGI it goes back to Apache / FCGI and CGI does not function
Possible cause I,
if this happens after additional php version is installed.
check if lib Apache is changed
go to virtualmin -> system configuration -> Re-check configuration
Check if our php is being detected
if detected, what version of mod_php is used
If mod_php is lower and on back end we have enabled the higher or different version of mod_php disable the module and enable once detected by virtualmin.
Possible cause II,
If a error happens stating something like
Restore failed : No section found for mod_fcgid directives
Then try to check if CGI module is installed.
IF this does not solve still shows directory missing error
That would be probably because the document root and directory command has been edited on back-end
docroot should be public_html
but on conf it has git like location
make sure you change this using virtualmin website option settings,
in apache config
added lines in <Directory “/home/user/public_html”> section of apache config
AddType application/x-httpd-php .php
AddHandler fcgid-script .php7.2
FCGIWrapper /home/user/fcgi-bin/php7.2.fcgi .php7.2
Some issue can be solved by below methods
Rename fcgi-bin, cgi-bin & etc folders in /home/user/ directory.