Use the SSL files API to get the ssl configuration of the server. This API returns the data of the files virtualizor.key
, virtualizor.crt
, virtualizor-bundle
and virtualizor.csr
which are present in the /var/virtualizor/conf
directory. This information is needed while setting up of SSL certificate.
For more information, you can refer this Adding SSL Certificate Guide.
HTTP Request
https://hostname:4085/index.php?act=ssl
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | ssl | Returns the ssl configuration of the particular server | Yes |
Sample Code
<?php
require_once('/usr/local/virtualizor/sdk/admin.php');
$key = 'your_api_key';
$pass = 'your_api_pass';
$ip = 'your_server_ip';
$admin = new Virtualizor_Admin_API($ip, $key, $pass);
$output = $admin->ssl();
print_r(json_encode($output));
?>
Output
{
"title": "SSL Files",
"keyconf": "Key configuration",
"crtconf": "Certificate configuration",
"csrconf": "Certificate Request Configuration",
"cert_bundle": "",
"timenow": "1471399565",
"time_taken": "0.103"
}