Domain loads blank directory; there are files on the server. Happened after primary domain changed. Full explanation inside.

Ishware

Well-Known Member
Nov 7, 2003
211
6
168
Williamsburg, VA
cPanel Access Level
Root Administrator
Okay, so I had created an account for one of my webdev clients, let's say it's example.com. I created an alias that was a subdomain of a dev domain I own, let's say that was site.dev, so I aliased example.site.dev. Client developed WordPress site at example.site.dev, and of course the files reside at /home/user/public_html/ (because it's aliased).

When it came time to make the site "live", my client's client had registered a different domain. So instead of example.com it now needs to be example.net. So before touching WordPress, I went into WHM and modified the account and changed its primary domain from example.com to example.net, and then edited my local hosts file to add "x.x.x.x example.net". Soon as I did that, when I go to example.net in private/incognito, I get an apache directory listing with no files: https://i.imgur.com/xVFr9yx.png

And I also get the same thing when I go to the alias - example.site.dev.

Before I modified the account in WHM, the WordPress installation was loading just fine at example.site.dev.

I have since:

1. Rebooted the server
2. Created a new account "user2" with example.net after re-modifying the original account back to its previous domain of example.com
3. Verified the IP in my hosts file is the correct main IP of the server

When I go to example.net, I get the same blank apache file listing. This after copying over all the files from /home/user/public_html to /home/user2/public_html and chowning (recursively) to user2:user2

WTF? The disease is somehow spreading!

What the heck can I check? Clearly *something* is wildly wrong. And now "user" and "user2" aren't working correctly.

Obviously the domains/users I've used are made up; I can give those details, but I don't think it's necessary, and cPanel IIRC usually prefers such details be obfuscated anyway.