Setting Up Let’s Encrypt in Ubuntu or Linux

First Follow this Article then

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04

 

Step 4 – Check SSL Certificate

If everything goes fine. A new ssl will be issued at below location. Navigate to below directory and view files.

cd /etc/letsencrypt/live/example.com
ls 

Files List:

  cert.pem
  chain.pem
  fullchain.pem
  privkey.pem

Setp 5 – Configure SSL VirtualHost

Use the following configurations for Apache and Nginx web server. Edit virtual host configuration file and add below entries for the certificate.

Nginx:

ssl on;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

Apache:

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem

Step 6 – Configure SSL Auto-Renew

In the end, configure the following job on your server crontab to auto-renew SSL certificate if required.

0 2 * * * sudo /usr/sbin/certbot-auto -q renew

Was this article helpful?

Related Articles

Leave A Comment?