16 lines
672 B
Plaintext
16 lines
672 B
Plaintext
<?php
|
|
/* Rename this file to letsencrypt.inc.php for use */
|
|
/* */
|
|
/* Set paths for fullchain.pem and privkey.pem */
|
|
$letsencrypt['path'] = "/etc/letsencrypt/live/<domain>/";
|
|
|
|
$letsencrypt['fullchain'] = file_get_contents($letsencrypt['path']."fullchain.pem");
|
|
$letsencrypt['privkey'] = file_get_contents($letsencrypt['path']."/privkey.pem");
|
|
|
|
/* Please do not change anything below */
|
|
$letsencrypt['pem_private_key'] = openssl_pkey_get_private($letsencrypt['privkey']);
|
|
$pem_public_key = openssl_pkey_get_details($letsencrypt['pem_private_key'])['key'];
|
|
|
|
$letsencrypt['server.pem'] = $letsencrypt['fullchain'];
|
|
$letsencrypt['pubkey.pem'] = $pem_public_key;
|