Install letsencrypt package in Ubuntu 22.04
Update the local package index
sudo apt update
Install certbot package for apache
sudo apt install python3-certbot-apache certbot
Install certbot package for apache nginx
sudo apt-get install python3-certbot-nginx certbot
Command to generate letsencrypt SSL certificate for apache
sudo certbot --apache -d example.com -d www.example.com
Command to generate letsencrypt SSL certificate for nginx
sudo certbot --nginx -d example.com -d www.example.com
First, dry run to test SSL renwal
sudo certbot renew --dry-run
Renew lets encrypt SSL certificate
sudo certbot renew
sudo systemctl reload apache2
or,
sudo systemctl reload nginx
0 comments:
Post a Comment