Andy
A-ndy.dev

A-ndy.dev

Setup Let's Encrypt With Apache on Ubuntu 16.04

Andy's photo
Andy
·Aug 7, 2021·

1 min read

1. Install Let's Encrypt

$ apt-get install git $ git clone github.com/letsencrypt/letsencrypt /opt/letsencrypt

2. Generating a Let's Encrypt SSL certificate

$ ./letsencrypt-auto --apache -d domain.com -d domain.com

3. Forcing SSL

RewriteEngine On RewriteCond % 80 RewriteRule ^(.*)$ yourubuntuserver.example/$1 [R,L]

4. Automatically renewing Let's Encrypt certificates

$ crontab -e

Add

15 5 * * 5 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log

Congratulations! Ubuntu 16.04 is now utilizing SSL certificates using Let's Encrypt completely free of charge.

 
Share this