1. Install certbot and nginx plugin
- sudo apt install certbot python3-certbot-nginx -y
2. confirm your web before install SSL
- sudo nano /etc/nginx/sites-available/test.com
3. Check syntax errors
- sudo nginx -t
4. Reload nginx
- sudo systemctl reload nginx
5. Check firewal, if active allow https
- sudo ufw status
- sudo ufw allow 'Nginx Full'
- sudo ufw delete allow 'Nginx HTTP
6. Obtaining an SSL Certificate
- sudo certbot --nginx -d test.com -d www.test.com
7. verify auto renewal
- sudo systemctl status certbot.timer
8. Test renewal proccess
- sudo certbot renew --dry-run
DONE
NOTE: - First, pointing yourdomain. example: www.test.com test.com to public ip address
- For another domain, follow just step 6