Check Configuration -> Suexec configuration directory incorrect

I just ran the check.cgi script, and I had overlooked this before, but I saw this:

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.

Any pointers on this for Centos? I see some accommodations made for Ubuntu, but not much on Centos. A lot of the Centos fixes involve uninstalling httpd, but I’m uncertain as to why, on a fresh instance, the Virtualmin installer wouldn’t take care of this? Thanks.

If it’s CentOS 8…

The Virtualmin installer (well, the config check, in this case) should take care of it, by telling you you can’t run CGI or FCGId scripts as the user. You can run PHP scripts using FPM, which is the recommended way to run PHP, anyway.

Yes it’s Centos 8.2. I forgot to add that to my initial post, apologies. Can you enlighten me on why this happens in 8, vs 7.8? Thank you :slight_smile:

That’s covered in the original announcement for CentOS 8.

In short: We no longer ship a custom Apache package, and the one provided by CentOS does not allow changing the suexec docroot. You probably shouldn’t be using it anyway. PHP-FPM is the recommended way to run PHP applications.

Thanks for the info @Joe :slight_smile:

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