Certbot

From Wiki
Revision as of 18:03, 19 April 2018 by Scott (talk | contribs) (Created page with "{{lowercase title}} https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 The <code>certbot</code> connects to Let's Encryp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04

The certbot connects to Let's Encrypt to obtain an SSL certificate for your server.

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx

Create the file /etc/nginx/snippets/ssl-certbot-renewal.conf:

# support for certbot ssl auto-renewal
location ^~ /.well-known/ {
    default_type "text/plain";
    root /var/www/html/;
}

Include the following line in the ssl config for each domain:

include snippets/ssl-certbot-renewal.conf;

Now run a command like this:

certbot certonly --webroot --webroot-path=/var/www/html \
-d example.com \
-d domain1.example.com \
-d domain2.example.com