Moving Domain for an Account Issue

dstana

Well-Known Member
Jul 6, 2016
102
17
68
Phoenix, AZ
cPanel Access Level
Root Administrator
I've been having issues when moving the domain for an account. While after trying to process it, it throws an API error. It appears the domain has changed, but after trying the domain I get the defaultwebpage.cgi page.

Usually following the steps rebuilding the userdata files (How to Rebuild userdata Files - cPanel Knowledge Base - cPanel Documentation) will resolve this issue but it doesn't seem to be working.
 

dstana

Well-Known Member
Jul 6, 2016
102
17
68
Phoenix, AZ
cPanel Access Level
Root Administrator
After grepping through the main httpd.conf file I noticed the vhost for this one is missing.

What can I do besides running /scripts/rebuildhttpdconf or manually adding the vhost? Because running the rebuild script isn't adding it like it should.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello @dstana,

Can you let me know the full steps you used to move the domain? Did you simply use WHM >> Modify an Account, or did you perform alternate steps?

Thank you.
 

dstana

Well-Known Member
Jul 6, 2016
102
17
68
Phoenix, AZ
cPanel Access Level
Root Administrator
That is exactly what I've done. I use Modify an Account and change the domain and username.

The last 3 domains that have been changed have had the same issue. It's an API error about not being able to fetch userdata for the old username.
 

dstana

Well-Known Member
Jul 6, 2016
102
17
68
Phoenix, AZ
cPanel Access Level
Root Administrator
This is an on-going issue of having to manually add entries to httpd.conf

The account I fixed earlier by doing this gets removed from httpd.conf when running the rebuild script.

I resolved this by removing the account and re-creating it.
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
Hi @dstana

I wonder if the userdata files is not being updated properly when you change the domain name. I know that there was a case re: this recently where modifying an account's main domain caused it to lose all virtual ftp accounts on subdomains but nothing specific to the error you're receiving.

Any manual edits to the httpd.conf will not be retained once apache restarts so this is not the way it should be modified. After changing the domain name I wonder if the issue would persist if you ran the following manually:

Code:
/scripts/updateuserdomains
/scripts/updateuserdatacache
mv /etc/apache2/conf/httpd.conf{,.bk}
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
Thanks!