Submitted by zignut on Fri, 12/22/2017 - 07:53 Pro Licensee
I'm running CentOS7, latest of all the things, including running PHP7(remi repository) as primary, and attempting to run 7, 5.6 as possibilities.
I'm currently trying to figure out why some sites just attempt to download PHP to the client, while most(under FPM), work fine.
Problem is, with a (mostly) working setup, if re-check configuration, Vmin complains
"The Apache module mod_cgi is either not installed or not enabled."
and immediately stops the config with "your system is not ready for use by Virtualmin."
I'm using mpm_event so I'm aware that mod_cgi wouldn't be in use - mod_cgid would be. I see some checks in the code for cgid, so I'd assume it should "just work", but I'm seeing this isn't the case.
Status:
Closed (fixed)
Comments
Submitted by zignut on Fri, 12/22/2017 - 07:54 Pro Licensee Comment #1
Submitted by zignut on Fri, 12/22/2017 - 07:57 Pro Licensee Comment #2
Submitted by andreychek on Fri, 12/22/2017 - 09:16 Comment #3
Howdy -- Jamie may need to chime in about the mod_cgi vs mod_cgid notices you're receiving in the config check, though I suspect that's not the cause of the issue you're seeing.
Regarding the downloaded files -- you may be seeing a config issue with those PHP packages... they may be adding a SetHandler line that's causing the trouble there.
What is the output of this command:
find /etc/httpd -type f | xargs grep -i sethander
Submitted by zignut on Fri, 12/22/2017 - 14:30 Pro Licensee Comment #4
find /etc/httpd -type f | xargs grep -i sethandler
(sethandler vs sethander :)Gives me a mixture of:
SetHandler proxy:fcgi://localhost:xxxx
in httpd.confSetHandler application/x-httpd-php
in php.confSubmitted by JamieCameron on Fri, 12/22/2017 - 16:18 Comment #5
There's a bug that can cause this false warning, which we'll fix. You can basically ignore it for now.
Submitted by zignut on Fri, 12/22/2017 - 17:00 Pro Licensee Comment #6
Jamie any workaround I can do for now? It stops the reconfigure wizard from progressing.
Submitted by JamieCameron on Fri, 12/22/2017 - 17:27 Comment #7
The work-around is to apply this patch : https://github.com/webmin/webmin/commit/35be61e9f8d8a9a8592b0be0aafbec71...
Submitted by aschenbr on Tue, 01/16/2018 - 17:25 Pro Licensee Comment #8
I have this same issue.Is there a way to get a littel more detail on applying this patch.
Thanks
Submitted by JamieCameron on Tue, 01/16/2018 - 23:30 Comment #9
Basically, just create the the file /usr/libexec/webmin/apache/mod_cgid.pl containing the contents from the patch.
Dear JamieCameron Thanks a lot for your great help. You are so nice, benevolent and great soul. Each time I work with Virtualmin webmin I think of you and send you best wishes and blessings. May you and your good team always prosper and be content. What shall I do without your incredible support.
Submitted by Rolcsi on Tue, 03/13/2018 - 08:29 Comment #11
I have a same problem. Can you tell me how to fix this in Ubuntu?
Submitted by rrhode on Tue, 03/27/2018 - 07:55 Comment #12
@Rolcsi On Ubuntu it's located at /usr/share/webmin/apache/mod_cgid.pl
However I'm still getting this error and that file is already there when I checked so I'm not too sure what's up just yet.
Ubuntu Linux 16.04.3
Webmin version 1.881
Usermin version 1.734
Virtualmin version 6.02-3
Submitted by JamieCameron on Tue, 03/27/2018 - 23:52 Comment #13
If you have that file and you're still seeing this error, login via SSH as root and run :
rm /etc/webmin/apache/site
virtualmin check-config
Submitted by rrhode on Wed, 03/28/2018 - 07:52 Comment #14
Thank you! Unfortunately I'm still seeing this after running that:
ERROR: The Apache module mod_cgi is either not installed or not enabled.
Everything seems to be working ok though from what I can see. There are only 2 virtual servers and both are using FCGId.
Submitted by JamieCameron on Thu, 03/29/2018 - 00:46 Comment #15
rrhode - which Virtualmin version are you running?
Submitted by rrhode on Thu, 03/29/2018 - 09:47 Comment #16
It's an Amazon EC2 micro instance.
Kernel and CPU: Linux 4.4.0-1052-aws on x86_64
Ubuntu Linux: 16.04.3
Webmin version: 1.881
Usermin version: 1.734
Theme version: Authentic Theme 19.09.2
Virtualmin version: 6.02-3
Submitted by zignut on Thu, 03/29/2018 - 14:26 Pro Licensee Comment #17
In case it lends any hope to resolving this for others - I solved this(for me) two ways. First one was I reloaded my server (ok, ok, not really a resolution.).
I just came across this recently getting another CentOS box up and running. While comparing webmin code and httpd configs between two servers, I found httpd.lock in /etc/httpd/conf/. the pid in the file no longer existed. I removed the lock file, restarted httpd, which pointed me to an error in the conf file, re-ran "virtualmin check-config" and I was up and running again. Not sure if it helps anyone, and if the lock file is created by virtualmin setup, it might be a good thing to alert to it's existence or remove it if the pid is dead.
Submitted by virtualmin@dbst... on Sat, 07/14/2018 - 11:10 Comment #18
For me the solution was simple: 1) go to Virtualmin 2) servers 3) Apache 4) global configuration 5) configure apache modules 6) enable "CGI"