xml-api SubDomain::addsubdomain problem

Csurgi

Registered
Apr 2, 2013
3
0
1
cPanel Access Level
Root Administrator
Hi!

I'm using the cPanel xml-api to manage domains/subdomains/etc on a server, and it's works very weird:

The testuser user has "maindomain.com" maindomain and an additional domain "seconddomain.com".

The request I used:
/xml-api/cpanel?cpanel_xmlapi_module=SubDomain&cpanel_xmlapi_func=addsubdomain&dir=/home/testuser/wwwroot/sub.seconddomain.com/&domain=sub&rootdomain=seconddomain.com&disallowdot=0&user=testuser

The effect of the request:

sub.maindomain.com A record created in the maindomain.com's dns zone
sub.seconddomain.com A record created in the seconddomain.com' dns zone

But there is still no sub.seconddomain.com virtualhost in apache config, and still not listed as subdomain on the cPanel user interface (web).

This is a version 11.40 build 24 cPanel/WHM

Please help! (or fix this bug ASAP:))
 

MikeDVB

Well-Known Member
PartnerNOC
Jun 4, 2008
220
6
68
Indiana, USA
Since this sounds like a bug [I've not verified it] I'd probably open a ticket with cPanel and submit the bug report directly. They'll be able to tell you if it's a known issue, the case ID [so you can watch the change-log], or if it's not a bug they should be able to guide you as to what you're doing wrong.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Are the VirtualHost entries added after rebuilding the Apache configuration file via "/scripts/rebuildhttpdconf"? Do you encounter the same problem when adding the subdomain through the cPanel interface?

Thank you.