Author Topic: CWP API v1/admindomains added domain but domain unable to access  (Read 1153 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
I used following code create new domain from CWP API.
> Domain Created and listed
> SSL generated, but when i access domain with https / http NOT FOUND


> When i create new domain manual its working,


<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://xxxx:2304/v1/admindomains',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('key' => 'xxxx','action' => 'add','user' => 'prod','type' => 'domain','name' => 'school1.xxxx.com','path' => '/public_html','autossl' => '1'),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
« Last Edit: March 26, 2023, 11:02:56 PM by mspgroups2020 »

Offline
****
Re: CWP API v1/admindomains added domain but domain unable to access
« Reply #1 on: April 08, 2023, 03:21:04 AM »
Are you creating DNS at the same time? Does the domain resolve properly?

Offline
*****
Re: CWP API v1/admindomains added domain but domain unable to access
« Reply #2 on: April 08, 2023, 01:48:59 PM »
Hi

'autossl' => 0