How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)
There are two modes when you don't want Certbot to edit your configuration:
- Standalone: replaces the webserver to respond to ACME challenges
- Webroot: needs your webserver to serve challenges from a known folder.
Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.
In the following, we're setting up
mydomain.com to be served from
/var/www/mydomain, and challenges will be served from