Description
This function sets a new primary SSL website for a dedicated IP address.
Examples
cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/SSL/set_primary_ssl?servername=hostname.example.com
LiveAPI PHP Class
$cpanel
=
new
CPANEL();
$SSL_set_primary_ssl
=
$cpanel
->uapi(
'SSL'
,
'set_primary_ssl'
,
array
(
'servername'
=>
'hostname.example.com'
,
)
);
LiveAPI Perl Module
my
$cpliveapi
= Cpanel::LiveAPI->new();
my
$SSL_set_primary_ssl
=
$cpliveapi
->uapi(
'SSL'
,
'set_primary_ssl'
, {
'servername'
=>
'hostname.example.com'
,
}
);
cPanel Template Toolkit
[% data = execute( 'SSL', 'set_primary_ssl', { servername => 'hostname.example.com',} ); %]
Command Line
uapi --user=username SSL set_primary_ssl servername=hostname.example.com
|
Output (JSON)
{
"messages": null,
"errors": null,
"status": 1,
"data": null
}
Parameters
Parameter
|
Type
|
Description
|
Possible values
|
Example
|
servername
|
string
|
Required
The primary SSL website's servername.
|
A valid hostname.
|
hostname.example.com
|
Returns
This function only returns metadata.