install certbot ubuntu 20.04 code example

Example 1: ubuntu install certbot

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install certbot
sudo apt-get install python-certbot-apache
# apache config
sudo certbot --apache
sudo certbot --apache -d your_domain -d www.your_domain

Example 2: apt-get install certbot

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install certbot
sudo apt-get install python-certbot-apache
# apache config
sudo certbot --apache

Example 3: secure letsencrypt on ubuntu 20.04

sudo certbot --nginx -d example.com -d www.example.com