Adding a SSL cert to gianna.codes
February 16, 2018 • How I used LetsEncrypt.org to add a *free* SSL certificate to my server for multiple domains.
Get the SSL cert
After installing all necessary packages:
sudo certbot --nginx certonly
Choose which domain name(s) you wish to obtain a certificate for.
LetsEncrypt puts the certificates here:
Create symlinks to the certificate and private key files:
ln -s /etc/letsencrypt/live/mycoolsite/privkey.pem /etc/ssl/private/mycoolsite-privkey.pem
ln -s /etc/letsencrypt/live/mycoolsite/fullchain.pem /etc/ssl/certs/mycoolsite-crt.pem
Update your Nginx configuration for the domain you wish to 'secure'. Can copy paste this code from the server block listening on port 80 and edit as follows (yours might look a little different, but the important stuff is prefixed
Just restart your Nginx and viola, mycoolsite is now using https.