Ubuntu 18 : How to install Let’s Encrypt (Add https to your site)

If you’ve finished setting up your LAMP setup, it’s important to encrypt the traffic over https, we do this with a free solution called Let’s Encrypt. Because why pay unless you’re an Enterprise..

ssh into the server with a user that can sudo up, and type:

sudo apt install python-certbot-apache

Follow the on-screen instructions.

Note: Make sure at namecheap.com or whatever registrar you use for your domains, that you have a proper IN A record set that points the domain @ to the IP. And for www. optionally.

If you use ufw, make sure you add port 443 to the list.

ufw allow 443

And then go and use certbot to create a certificate for each domain as setup in virtual hosts configuration files.

sudo certbot --apache -d example.com -d www.example.com

And that’s basically it.


Posted

in

by

Tags: