CentOS 8 suexec runs under /var/www instead of /home

I know this has been covered several times before and the cause has usually been attributed to not installing from the Virtualmin repo.

In this case I have a vultr.com instance which I invoked with their CentOS 8 image.
From that base I did the following through SSH

yum update -y
hostnamectl set-hostname
systemctl restart systemd-hostnamed

First time I also did
yum install perl -y
but the last time I omitted this since install.sh will do this for me.

I found that wget is already in CentOS 8 so no need to install that so on to
wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
sh install.sh

The script questions are quite clear and easy to answer, just as I have several times for CentOS 7.
However it fails in Webmin config as shown in Virtualmin install.sh support for CentOS 8

from which I learned to manually run /etc/webmin/restart and then re-run the installer script.
Having created a swap file the first time I had to answer NO to that the second time and the installer script completed without error.

In the post installer setup I chose the minimal options (it’s a 1GB memory instance), chose hashed passwords, and entered a blank SQL password. (as per Ilia’s post referenced above)

In the configuration check process a few issues were flagged.

  1. “Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.”
    I don’t think this is a problem.

  2. “SuExec cannot be used to run PHP scripts in CGI or FCGId modes : The Suexec command on your system is configured to only run scripts under /var/www, but the Virtualmin virtual server home directory is /home. CGI scripts run as domain owners will not be executed.”
    It appears that I must have the “standard” suexed module, but I expected the install script to get the virtualmin version with /home.

  3. “The AWstats command /usr/share/awstats/wwwroot/cgi-bin/awstats.pl was not found on your system.”
    I wonder if this is related to CentOS 8 not running cgi?

I’ve checked the repos enabled and they are
AppStream, BaseOS, extras, PowerTools (all CentOS)
epel-modular, epel (Extra Packages for Enterprise Linux Modular)
virtualmin (RHEL/CentOS), virtualmin-universal (Virtualmin Distribution Neutral Packages)

So my questions are:

  1. How can I fix the suexec issue? I’m not expert at compiling modues and installing)
    Could it be caused because the CentOS base install was not “minimal” enough and the installed Apache was not replaced?
  2. How can I fix AWStats?

Thanks in advance for any help.

PS. I also observed that the new Virtual Server template had not prefilled the default IPv4 address (IPv6 was prefilled). Perhaps that might link to the problem above?


We decided to drop support for custom Apache builds and thus. default Apache package from CentOS 8 repos compiled and hardcoded with suexec pointing to /var/www. There is nothing you should do really, just use FPM, it should cover all your needs, and it runs as server owner. Theoretically, mount binding /home to /var/www, could make things work but could require additional re-configuration.

How can I fix AWStats?

You can disable it in System Settings/Features and Plugins for now or install it from testing repos:

dnf --enablerepo=epel-testing install awstats

…however it will not work at the moment, as perl-Geo-IP is still missing.

peter - i have been working with rh/centos-8 and i believe i have it resolved.

https://github.com/webmin/webmin/pull/1218 (approved already)
https://github.com/webmin/webmin/pull/1222 *** this one is critical!
https://github.com/webmin/webmin/pull/1223 (for successful virtualmin install, at least without relying on luck)
for redhat only: https://github.com/virtualmin/virtualmin-install/pull/31

please let me know if you have any questions. i have been creating test google-VPS’s and have a working installation plan.

Thank you,

Thank you Ilia. Your reply reassures me that I have a working system and has helped me to understand a bit more about CentOS 8. The reason I’m keen to have CentOS 8 on this instance is to get Python 3 OOTB ready to go. And this is to implement Radicale cal/card server in reverse proxy/WSGI mode without virtual environments.

Thank you too, Mark for your help. Right now I don’t envisage multiple installs. I’m not red hot with Github and my preference is always to work with “production” releases. So I’m going to thank you for the contribution but wait for the stable release to incorporate the fixes. It makes it much easier for me to keep updated through the normal mechanism.

I do appreciate your speedy and helpful responses.