OS choice and CGI scripts

SYSTEM INFORMATION
OS type and version Rocky Linux 9.1
Webmin version 2.021
Virtualmin version 7.5 GPL but have a PRO license

After installing Virtualmin with Rocky Linux 9.1 my CGI scripts are not working. It’s similar to a problem I found in a previous thread from 2021:

My former CentOS 7 install shows suexec -V = -D AP_DOC_ROOT=“/var/www”
Current Rocky Linux 9.1 install shows suexec -V = -D AP_DOC_ROOT=“/home”

I did see something about using “suexec-custom packages” and I understand that CGI scripts may not be supported long-term.

Is there another OS I can use where I won’t encounter this problem? (e.g. Ubuntu 22.04 LTS or Alma) Not sure if not using the pro license made a different on the Rocky Linux 9.1 install test.

That sounds backward.

We used to provide a custom httpd package that had suexec doc root set to /home. We no longer do that. So, CentOS 7 installed a long time ago using the Virtualmin 6 installer and repos would have suexec docroot set to /home.

While a new install on Rocky 9 would have suexec set to /var/www, and you can’t run CGI scripts using suexec in Virtualmin-managed VirtualHosts, because they are in /home.

We added support for fcgiwrap a while back, however, which brings back CGI support for distros that don’t have suexec-custom. I’m not sure if Rocky 9 has an fcgiwrap package or if we install it by default or if anything is needed to make it available in Virtualmin. (I don’t use CGI and haven’t in many years, and mostly recommend you don’t either.)

Alma and Rocky are identical with regard to suexec. They are both rebuilds of RHEL.

Ubuntu and Debian have suexec-custom packages. But, I don’t think you need them for CGI, anymore, since fcgiwrap works, too, and without the suexec package. It is an app server that runs CGI scripts. It’s a little more complicated than running CGI scripts directly in Apache, but it’s probably a safer model, anyway.

I just checked, and fcgiwrap does appear in the EPEL repos, so you can install it on Rocky. I still can’t say, offhand, how you use it. But, Virtualmin does support it as of Virtualmin 7.

Ooops, I did have it backwards. Sorry. Thanks for the info.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.