Website Not Loading

SYSTEM INFORMATION
OS type and version Ubuntu 24.04.1
Webmin version 2.202
Virtualmin version 7.30.4
Webserver version Apache 2.4.58
Related packages SUGGESTED

I migrated my site to a new host that I installed Virtualmin on. When I access index.html via the IP (XX.XXX.XXX.X/index.html) the page loads fine, however when I try loading my main site via index.php I get an Error 500. This also happens with Roundcube, which I installed through Virtualmin.

I checked the access log but nothing there looks out of the ordinary. The Apache error log only has one issue I’m not sure about:

AH02811: script not found or unable to stat: /home/XXXXX/cgi-bin/luci

The PHP error log has a lot of these:

PHP Fatal error:  Failed opening required '/home/fanedit/web/XXXXX/public_html/wordfence-waf.php' (include_path='.:/usr/share/php') in Unknown on line 0
PHP Warning:  Unknown: Failed to open stream: No such file or directory in Unknown on line 0

Now, I’m unsure where it’s getting that first path since I can’t seem to find it referenced anywhere in a config file.

Since the index.html file is loading but index.php is not, I assume this is a PHP issue. I haven’t installed any PHP mods or anything yet, and this is a pretty vanilla Virtualmin install.

Any thoughts on what I could be missing? Thanks.

Do you see a PHP server on your dashboard servers list?


I’d think PHP would be installed along side Apache but I don’t know for sure.

root@main:~# ls -l /usr/share/php
total 192
drwxr-xr-x  3 root root  4096 Feb  6  2023 7.4
drwxr-xr-x  3 root root  4096 Feb 16  2023 8.2
drwxr-xr-x  3 root root  4096 Dec 20  2023 8.3
drwxr-xr-x  2 root root  4096 Jun 12  2023 Archive
drwxr-xr-x 26 root root  4096 Jun 24  2024 Composer
drwxr-xr-x  2 root root  4096 Jun 12  2023 Console
drwxr-xr-x  5 root root  4096 Feb 19  2023 data
drwxr-xr-x  2 root root  4096 Jul 15  2023 DB
-rw-r--r--  1 root root 43744 May  2  2020 DB.php
drwxr-xr-x  7 root root  4096 Feb 19  2023 JsonSchema
drwxr-xr-x  2 root root  4096 Jun 12  2023 OS
drwxr-xr-x 11 root root  4096 Jun 12  2023 PEAR
-rw-r--r--  1 root root 14825 Jun 12  2023 pearcmd.php
-rw-r--r--  1 root root 36171 Jun 12  2023 PEAR.php
-rw-r--r--  1 root root  1093 Jun 12  2023 peclcmd.php
drwxr-xr-x  4 root root  4096 Feb 19  2023 Psr
drwxr-xr-x  3 root root  4096 Feb 19  2023 React
drwxr-xr-x  3 root root  4096 Feb 19  2023 Seld
drwxr-xr-x  3 root root  4096 Jun 12  2023 Structures
drwxr-xr-x  5 root root  4096 Feb 19  2023 Symfony
-rw-r--r--  1 root root 20694 Jun 12  2023 System.php
drwxr-xr-x  2 root root  4096 Jun 12  2023 XML

does that file exist? usually the virtualmin format is /home/domainname/public_html
you seem to have more folder in between?

try commenting out that file.

Also, did you install wordpress with the Virtualmin install script?

Yeah, sorry. I was going to list that too but forgot. PHP-FPM 8.3.6 was installed alongside Apache.

The file does exist, yes. The path used to be /home//web//public_html and that’s where something is looking for the file. The new path with Virtualmin is as you mentioned. I checked the wp-config.php file but can’t find any reference to that file, so I’m not sure what’s calling it. I also have Xenforo installed in a subdirectory and that doesn’t load either, which is why I think there’s something up with PHP. I could be wrong though.

And no, I didn’t install Wordpress through Virtualmin. I just rsynced the old public_html dir over to the new host. All permissions look to be the same.

so what are the contents of the file

maybe this can help you

some .ini file

PHP Fatal error: Failed opening required … wordfence-waf.php | WordPress.org

This is what’s in the wordfence-waf.php file

<?php
// Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this.

if (file_exists(__DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php')) {
        define("WFWAF_LOG_PATH", __DIR__.'/wp-content/wflogs/');
        include_once __DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php';
}

Thanks. I corrected the path but that didn’t fix the problem. I also renamed the file to see if that would help but it didn’t.

check if that is set to the wrong path in some ini file for php

also remember to restart php-fpm and apache

How did you install this? If you used the Virtualmin script to install wordpress it should just work. Also, is that wordfence a plugin? I don’t know WP but someone mentioned adding it for security at one point.

Appreciate the help. It looks like it was a database issue as deleting them and then re-adding them with new passwords seems to have fixed it.