Chapter 89: Controller: /siteworx/prefs Up Part III: SiteWorx API Spec Chapter 91: Controller: /siteworx/ssl/chain 

90 Controller: /siteworx/ssl

Required Permissions "SSL"
Required Options SSL Access
Action: generateLetsEncrypt
Added in version 5.1.4-1042
Description Generates SSL certs via LetsEncrypt.
Input Parameters
Name Type Notes Required?
domain string Example Values
example.com, secondary.com
Yes
commonName string Help Entry
Please select the domain name (common name) this certificate will use. If you do not see your desired domain, you will first need to add it as a pointerdomain or as a subdomain in SiteWorx.<br/><br/>Note that ’www.domain.com’ is <strong>not</strong> the same as ’domain.com’.<br/><br/>A wildcard domain begins with an asterisk, ’*’, and is valid for all subdomains. For example, a Common Name of ’*.domain.com’ would create a CSR that is valid for ’domain.com’, ’sub1.domain.com’, ’sub2.domain.com’, and so on.
Example Values
example.com, mail.example.com, ftp.example.com, sub.example.com, www.example.com
Yes
subjectAltName struct (string) Help Entry
List alternative domain names you wish to associate with this certificate.
Example Values
example.com, mail.example.com, ftp.example.com, sub.example.com, www.example.com
No
emailAddress string Description
Used for urgent notices and lost key recovery.
Help Entry
Please enter the email address that is associated with this certificate.
Example Default Value
user@example.com
No*
mode string Help Entry
"Live" mode will generate a real LetsEncrypt signed certificate. "Staging" mode will generate a fake certificate that should only be used for testing purposes.
Example Values
staging, live
Example Default Value
live
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: install
Added in version 4.7.0-339
Description Installs SSL to vhost config.
Input Parameters
Name Type Notes Required?
domain string Example Values
example.com, secondary.com
Yes
chain integer Example Values
1, 0
Yes
cascade_to_nodes integer Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
Action: listSslInfo
Added in version 6.0.11-1380
Description List SSL Info.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’config_exists’ => true,
’key’ => ’/home/example/var/example.com/ssl/example.com.priv.key’,
’csr’ => ’/home/example/var/example.com/ssl/example.com.csr’,
’crt’ => ’/home/example/var/example.com/ssl/example.com.crt’,
’ssl_domain’ => ’example.com’,
’expiry’ =>
array (
’valid_from’ => 1510796653,
’valid_to’ => 1542332653,
),
’parsed_cert’ =>
array (
’C’ => ’US’,
’ST’ => ’PA’,
’L’ => ’Pittsburgh’,
’O’ => ’InterWorx’,
’OU’ => ’Testing’,
’CN’ => ’example.com’,
’emailAddress’ => ’admin@example.com’,
),
’alt_names’ =>
array (
’example.com’ => ’example.com’,
),
’cert_issued_by’ => ’##LG_SSL_SELF_SIGNED_CERTIFICATE##’,
),
)
Action: uninstall
Added in version 4.7.0-339
Description Removes SSL from vhost config.
Input Parameters
Name Type Notes Required?
domain string Example Values
example.com, secondary.com
Yes
cascade_to_nodes integer Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
 Chapter 89: Controller: /siteworx/prefs Up Part III: SiteWorx API Spec Chapter 91: Controller: /siteworx/ssl/chain 

(C) 2017 by InterWorx LLC