WHAT'S NEW?
Loading...
Showing posts with label certificate. Show all posts
Showing posts with label certificate. Show all posts
These instructions are usefull to set up a TLS/SSL certificate from Let’s Encrypt on a CentOS 7 server running Apache as a web server.


# Install Epel Repository
yum install epel-release

 Download the Let’s Encrypt Client

git clone https://github.com/letsencrypt/letsencrypt /opt/letsencryptù

Set Up the SSL Certificate

cd /opt/letsencrypt

Install a single certificate that is valid for multiple domains or subdomains

./letsencrypt-auto --apache -d website.com -d www.website.com

Set Up Auto Renewal

Let’s Encrypt certificates are valid for 90 days, but it’s recommended that you renew the certificates every 60 days. Let's Encrypt client has a renew command that automatically checks the currently installed certificates and tries to renew them if they are less than 30 days away from the expiration date.

./letsencrypt-auto renew
Create a cron job that will periodically execute the automatic renewal command.

To update the Let’s Encrypt Client

  • cd /opt/letsencrypt
  • git pull
When you see that image, it means that you're running into a self-signed certificate for WHM, that you'll have to accept in order to proceed.



Sometimes you neeed to import the certificate from a server to another to enble SSL and not display this message. The PFX file enables transfer of certificates and their private keys from one computer to another. Assume, you have a file named domainexample.com.pfx and do you want to install into a WHM / cPanel

1. Export the key file,
openssl pkcs12 -in domainexample.pfx -nocerts -out domain.key

2. Export the decrypted key file,
openssl rsa -in domainexample.key -out domain.decrypted.key

3. Export the Certificate, crt file,
openssl pkcs12 -in domainexample.pfx -clcerts -nokeys -out domain.crt

4. Export the Ca Bundle file,
openssl pkcs12 -in domainexample.pfx -cacerts -nokeys -out cabundle.pem
 

After all these operations, go to Open WHM and follow the menù

Home >> SSL/TLS >> Install an SSL Certificate on a Domain