WHMCS | VestaCP Module | Unable to create sub domains.
Posted: Mon Sep 14, 2015 7:26 pm
As I use the WHMCS | VestaCP Module, I want to offer free sub domains for the members of my community.
Looking at the WHMCS VestaCP module; it seems that it doesn't support this feature at all. It's only utilized for creating new accounts with the purchase of a domain entirely. While that works perfectly fine so far. There is nothing for sub domain creation for an account already created in VestaCP.
Now I see the cmd/CLI for "v-add-domain" but I fear I don't see a cmd for creating sub domains looking over the CLIs for VestaCP unless I'm overlooking something. Is this even possible without having a cmd for creating sub domains to be added in the Module?
Any help would be appreciated! Much thanks VestaCP! I love the work so far, loved the new update, and I've learned so much so much because of VestaCP so far! :)
Looking at the WHMCS VestaCP module; it seems that it doesn't support this feature at all. It's only utilized for creating new accounts with the purchase of a domain entirely. While that works perfectly fine so far. There is nothing for sub domain creation for an account already created in VestaCP.
Code: Select all
// Add domain
if(($answer == 'OK') && (!empty($params["domain"]))) {
$postvars = array(
'user' => $params["serverusername"],
'password' => $params["serverpassword"],
'hash' => $params["serveraccesshash"],
'cmd' => 'v-add-domain',
'arg1' => $params["username"],
'arg2' => $params["domain"],
'arg3' => $params["configoption3"],
);
$postdata = http_build_query($postvars);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . ':8083/api/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
$answer = curl_exec($curl);
logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
}
Any help would be appreciated! Much thanks VestaCP! I love the work so far, loved the new update, and I've learned so much so much because of VestaCP so far! :)