Configure SSL Certificates
These instructions will allow you to configure ssl certificates.
Prerequisite: You’ve got your domain set up like my-site.com (LMS) and studio.my-site.com (CMS) or like learning.my-site.com (LMS) and studio.learning.my-site.com (CMS). In this case, I’ve done it with the second example. Both processes are similar.
Configure a server_name in your lms and cms nginx configuration files
Update file /etc/nginx/sites-enabled/lms with following changes.
Use the following command to access the lms file from the terminal:
sudo nano /etc/nginx/sites-enabled/lms
Make the following changes in the files.
Find the following in the file:
server_name
Add/update the domain name there:
server_name learning.my-site.com
Use the following command to access the cms file from the terminal:
sudo nano /etc/nginx/sites-enabled/cms
Make the following changes in the files.
Find the following in the file:
server_name
Add/update the domain name there:
server_name studio.learning.my-site.com
The steps that worked (from certbot’s site: https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx)
Following commands to install and configure certbot
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx
There is a possibility that certbot might affect your nginx conf files, but it works by making changes at the bottom of the file without changing any existing content in the file, so it is fairly safe.
Found a recurring renewal task by running this command
systemctl list-timers