You are here

Virtualmin CGI not executing for website

Noticed this very strange issue on a client's hosting server that was running VirtualMin.
The server was transferred to another server after which, all website began getting internal server error messages.

Log debug showed the following when I tried PHP5 option:
[Wed Sep 12 01:34:55.671798 2018] [cgi:error] [pid 20963] [client 190.213.168.75:26586] End of script output before headers: php5.cgi
[Wed Sep 12 01:34:56.035616 2018] [cgi:error] [pid 20964] [client 190.213.168.75:26587] End of script output before headers: php5.cgi, referer: https://studentfutures.org/info.php
[Wed Sep 12 01:34:58.522405 2018] [cgi:error] [pid 20992] [client 190.213.168.75:26588] End of script output before headers: php5.cgi
[Wed Sep 12 01:34:58.875249 2018] [cgi:error] [pid 20960] [client 190.213.168.75:26589] End of script output before headers: php5.cgi, referer: https://blah.org/info.php
[Wed Sep 12 01:34:59.585248 2018] [cgi:error] [pid 20961] [client 190.213.168.75:26590] End of script output before headers: php5.cgi
[Wed Sep 12 01:34:59.943814 2018] [cgi:error] [pid 20962] [client 190.213.168.75:26591] End of script output before headers: php5.cgi, referer: https://blah.org/info.php
[Wed Sep 12 01:35:35.833060 2018] [cgi:error] [pid 20963] [client 63.143.42.253:63699] End of script output before headers: php5.cgi, referer: http://blah.org
[Wed Sep 12 01:36:35.770102 2018] [cgi:error] [pid 20964] [client 63.143.42.253:47157] End of script output before headers: php5.cgi, referer: http://blah.org/

Log debug showed the following when I tried PHP7 option:
[Wed Sep 12 01:37:17.313511 2018] [cgi:error] [pid 21753] [client 190.213.168.75:26633] End of script output before headers: php7.0.cgi
[Wed Sep 12 01:37:17.697382 2018] [cgi:error] [pid 21754] [client 190.213.168.75:26635] End of script output before headers: php7.0.cgi, referer: https://blah.org/info.php

It seems suexec permissions were not restored properly, the following command fixed it!
chmod 4755 /usr/sbin/suexec