virtualmin / virtualmin-gpl

Virtualmin web hosting control panel for Webmin
https://www.virtualmin.com
GNU General Public License v3.0
312 stars 97 forks source link

The default CGI mode is not set with Nginx installations #859

Open iliajie opened 1 month ago

iliajie commented 1 month ago

Howdy Jamie!

I have done a number of clean installations today and discovered that installations with Nginx still don't have cgimode set up. If you go to Templates after the initial installation, the toggle for CGI script execution mode is not set to either CGI scripts disabled or FCGIwrap server.

However, we successfully fixed this issue for Apache systems, which is great!

jcameron commented 1 month ago

Sounds like a bug - which versions of Virtualmin and the Nginx plugin were you using?

iliajie commented 1 month ago

This is a clean install, using the latest versions from the repositories, Virtualmin 7.20.1 and Virtualmin Nginx 2.36.

jcameron commented 1 month ago

What does the cgimode= line in /etc/webmin/virtual-server/config contain after an install?

Also if you run virtualmin check-config , what CGI modes does it say are available?

iliajie commented 1 month ago

What does the cgimode= line in /etc/webmin/virtual-server/config contain after an install?

It is set to suEXEC, e.g.:

root@ubuntu24-gpl:~# grep cgimode /etc/webmin/virtual-server/config 
cgimode=suexec

Also if you run virtualmin check-config , what CGI modes does it say are available?

FCGIWrap only, e.g.:

root@ubuntu24-gpl:~# virtualmin check-config
...
The following CGI script execution modes are available : fcgiwrap

The following PHP execution modes are available : fcgid fpm
...
jcameron commented 1 month ago

That's odd, because the post-install script should fix invalid CGI modes.

If you run :

cd /usr/libexec/webmin
WEBMIN_CONFIG=/etc/webmin /usr/libexc/webmin/run-postinstalls.pl virtual-server

Does it fix /etc/webmin/virtual-server/config ?