certbot for nginx code example
Example 1: ubuntu certbot nginx
sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.com
Example 2: letsencrypt auto renew nginx
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 */12 * * * root certbot -q renew --nginx
Example 3: nginx letsencrypt
sudo certbot renew
sudo service nginx restart