Frequently Asked Questions

How To Secure Nginx with Let's Encrypt on Ubuntu 16.04
Last Updated 5 months ago

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo nano /etc/nginx/sites-available/default
server_name example.com www.example.com;
nginx -t
systemctl reload nginx

ufw status
Output
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Nginx HTTP ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx HTTP (v6) ALLOW Anywhere (v6)

ufw allow 'Nginx Full'
ufw delete allow 'Nginx HTTP'

ufw status

Output
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Nginx Full ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)

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

test

certbot renew --dry-run

Please Wait!

Please wait... it will take a second!