I have several cPanel accounts on my server (running Cloudlinux 5). I managed them using WHM.
My current situation (replacing the real domain with example.com
):
Account A has an addon domain example.com
.
Account B's primary domain is sub.example.com
.
I want to add another sub domain sub2.example.com
to Account B, so that it points to Account B's document root.
Now cPanel doesn't allow me to do so. It says example.com
is owned by another user, which should be Account A, I guess.
Is there any way to point sub2.example.com
to Account B's document root? I'm not asking for redirection from sub2.example.com
to sub.example.com
. The url sub2.example.com
should not change.
What I have tried:
Add DNS record:
sub2 IN CNAME sub.example.com
.Add
sub2.example.com
file to/var/cpanel/userdata/AccountB
.
sub2.example.com
just loads the server IP's default document root.
Any help is appreciated.