In-place upgrade from RHEL 7 to Rocky 8. http 500 error

SYSTEM INFORMATION
OS type and version Rocky 8.6
Webmin version 1.984
Virtualmin version 6.0-3
Related packages SUGGESTED

Hi all,

I performed an in-place upgrade from RHEL 7 to RHEL 8, and then to Rocky 8. All went swimmingly. The issue I am having right now is attempting to visit a PHP based website hosted on the node results in an HTTP 500.

I get the following error when I try to set the PHP version for the website:

Failed to save PHP options : 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

I found another post where someone wasn’t running the Virtualmin provided HTTPD packages. I have the Virtualmin repo enabled, however it is not showing any Apache packages available under Rocky 8. The apache packages I have installed right now on this system came from the Rocky repos, not Virtualmin.

Any ideas?

Thanks for the help!

Hello,

It seems that Virtualmin repos are outdated on your system. Try doing the following:

  1. Remove a repo file by running rm -f /etc/yum.repos.d/virtualmin.repo
  2. Download beta version of Virtualmin install script and running it with --setup param to configure repositories and exit
  3. Install latest Webmin 1.994 and Virtualmin 7.1 by running dnf clean all && dnf update -y
  4. Re-run config check

Also, you do not need any custom Apache builds.

After all of this was done do you have fcgiwrap package installed?

Hi,

Thanks for the reply! Sorry for the delay, finally got around to looking at this again.

I did as you suggested and after a few small things during the checkup, it all passes now. After doing that, “FPM” is the only PHP manager available now for the site, fcgi option went away. I do have fcgiwrap installed.

I have set the site to FPM now, however I still get the same error. When I look at the FPM logs, it is showing the following:

[03-Jun-2022 11:13:21 America/Chicago] PHP Warning: require_once(/home/southern/public_html/wp-config.php): failed to open stream: Permission denied in /home/southern/public_html/wp-load.php on line 37

[03-Jun-2022 11:13:21 America/Chicago] PHP Fatal error: require_once(): Failed opening required ‘/home/southern/public_html/wp-config.php’ (include_path=‘.:/usr/share/pear:/usr/share/php’) in /home/southern/public_html/wp-load.php on line 37

The FPM config file for this site is correct, and I have verified there is a process running for this pool that is running under the user account:

[root@main php-fpm.d]# cat 15371066432688.conf
[15371066432688]
user = southern
group = southern
listen.owner = southern
listen.group = southern
listen.mode = 0660
listen = /var/php-fpm/15371066432688.sock
pm = dynamic
pm.max_children = 9999
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_value[upload_tmp_dir] = /home/southern/tmp
php_value[session.save_path] = /home/southern/tmp

Still digging around. Unsure why FPM can’t open or run the files as the user. Permissions are set fine on the files as well.

Alright, got it working. It was bad httpd.conf configuration from manual changes I had made long ago that caused some issues. Site is loading now :slight_smile:

Next question - Why did fcgid disappear as an option, and how do I get that back?

Please stick with PHP-FPM – you really don’t need it back! :wink:

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