Install Certbot and it’s Nginx plugin with apt:
sudo apt install certbot python3-certbot-nginx
Verifies the syntax of your configuration edits:
sudo nginx -t
Reload Nginx to load the new configuration:
sudo systemctl reload nginx
To see the current setting of firewall:
sudo ufw status
Allows the Nginx Full profile and delete the redundant Nginx HTTP profile allowance:
sudo ufw allow 'Nginx Full'
sudo ufw delete allow 'Nginx HTTP'
Obtaining an SSL Certificate
sudo certbot --nginx -d example.com
Verifying Certbot Auto-Renewal:
sudo systemctl status certbot.timer
To test the renewal process, you can do a dry run with
certbot
:
sudo certbot renew --dry-run
by Valeri Tandilashvili
3 years ago
Linux
HTTPS
0
Pro tip: use ```triple backticks around text``` to write in code fences