Changed primary domains document root and it shows correctly on cPanel yet the site still loads old document root

jenkinsmi

Registered
Jun 30, 2021
2
0
1
uk
cPanel Access Level
Root Administrator
Hey guys we've been working to change the main document root for our website...

1: We changed the main domain root in the files within: cpanel/userdata/servername, in both the main file and SSL files, and then deleted the two cache files.

2: We also changed the main document root within the server itself on both https and http, in a file like this e.g. "/etc/apache2/conf.d/userdata/std/2_4/SERVERNAME/MAINDOMAIN.com/*.conf"
And also in
"/etc/apache2/conf.d/userdata/ssl/2_4/SERVERNAME/MAINDOMAIN.com/*.conf"

3: We then also changed the main document root within the main server config file however the bit above should overwrite that.

cPanel now says the correct document root, we've cleared cache on cloudflare... however when you put the url in it still loads as if it's still pointing at the old document root.

Any ideas guys? We're completely stumped!
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! You should not need to do anything inside /etc/apache2/conf.d/userdata/std/2_4/SERVERNAME/MAINDOMAIN.com/*.conf as those are include files that would not be related to the document root configuration. However, if you have custom includes that were set up manually at some point, you would also need to update those.

Can you follow the details here and let me know if you get better results?

 

jenkinsmi

Registered
Jun 30, 2021
2
0
1
uk
cPanel Access Level
Root Administrator
Hey cPRex thanks for helping

Sadly changing the document root in those two files, and then running those scripts and commands does not work.

On cPanel it says it's pointing to the right folder, but the result is still when loading the site it loads from the old domain root, proved by doing a die("here"); in the old directories index.php which shows up.

Any ideas?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
I don't really have any other ideas on that one - we've been using the same process to update the document root for many years and it's always performed well. It might be best to open a ticket with our team so we can investigate that on our side.

If you do open a ticket, please post the number here so I can follow along and make sure this thread stays updated.