How to install Let's Encrypt on your VPS
Step 1
Visit https://certbot.eff.org
Step 2
Select your server details and web server software
Step 3
Include: ServerName yourdomain.com
Comment out all WSGI commands (They're not allowed to be duplicated)
Step 4
Follow the commands below, based on your selection
Step 5
Run the sudo certbot --apache command and follow the prompts
NB: certbot will create a new file with a 'le-ssl.conf' extension
Step 6
In the original '.conf' file running on port 80; Remove all the django configurations and maintain the 'Rewrite traffic' configurations and save the file
Step 7
In the new configuration file ending in 'le-sse.conf' (Running on port 443); Uncomment out the WSGI lines (That will allow the web server to talk to the Django code).
Now save the file
Step 8
sudo ufw allow https
sudo certbot renew --dry-run - To manually run
Setup automatic renewal by following the below Steps
Step 1
sudo crontab -e
Step 2
In your text editor set how you would want the crontab to run. Below code runs once a month
30 4 1 * * sudo certbot renew --quiet
If you need assistance with your projects feel free to email me at info@airgad.com or whatsapp Jesse stay safe!