Author Topic: Can't Get CentOS 9 to Serve Any Content Except Test Page  (Read 22 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Can't Get CentOS 9 to Serve Any Content Except Test Page
« on: December 30, 2025, 03:34:19 AM »
I realize CentOS 9 is not the preferred OS, but I'm hostage to Digital Ocean and an old IP address that about 100 of my customers are using. It would be a nightmare to chase them all down to change their DNS. Digital Ocean will only allow me to "rebuild" with an OS from the same family, meaning I'm stuck with some version of CentOS. A clean 9 is the best option they had.

My problem is that CWP serves only the test page. I had configured nginx + apache and fixed a few problems and added a repo to get php7.4-fpm working. Service SSH showed Apache listening on 8181 and nginx listening on 80 and 443. But still, only the test page.

I switched to pure nginx, rebuilt the server, rebuilt the vhosts, set the Nginx default vhost template type to php-fpm and the Nginx default PHP-FPM template to wordpress_ssl. Aside from an error about redefining the SSL options in the vhost, there are no errors in the logs.

What am I missing? I'm about ready to just install a LEMP stack on the server and PAINFULLY write a bunch of server directives. I don't let any users run mail servers. I only need the simplest of server setups, but I can't get a single page out at this time.


Offline
***
Re: Can't Get CentOS 9 to Serve Any Content Except Test Page
« Reply #1 on: December 30, 2025, 08:20:14 AM »
Do you specify the IP of your VPS/server or domain names installed on your vps/server in your URLs  to test HTTP/HTTPS access to the sites ?

Offline
*
Re: Can't Get CentOS 9 to Serve Any Content Except Test Page
« Reply #2 on: December 30, 2025, 12:55:03 PM »
Yes, I have a custom hosts file on my local computer and I can see my requests in the account access logs.

The shared IP is set in the server and the two test accounts are configured to use it.

When I look at the vhost file for nginx for the test account, there is no listen 443, only 80. I am allowing the system to create that file from template "wordpress_ssl" but it seems from my other Wordpress sites running standalone nginx that there should be a redirect from port 80 and the home directory should be in the 443 block. I am thinking today I'll manipulate one of my good sites' sites-available .conf files and try that. The problem is that if I have to custom write each server directive then what's the point?

Maybe I should get one working, then change the system template for "wordpress_ssl" to be correct. ?? This project is over 10 years old. It seems odd that such a fundamental problem should still exist. So I must be missing something.

Offline
*****
Re: Can't Get CentOS 9 to Serve Any Content Except Test Page
« Reply #3 on: December 30, 2025, 10:23:32 PM »
And to be sure, your DocumentRoot is correctly set? And your DirectoryIndex is set to look for index.php? Personally, I remove index.htm and make sure index.php is the first hit, then index.html is the secondary possibility.