Here is an easy way to add a new https site with a Let's Encrypt certificate using Nginx and acme.sh.
Configure Nginx
# File: /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
location /.well-known { # <- here is the trick
root /var/www/html;
}
...
}
~/.acme.sh/acme.sh --issue -w /var/www/html -d example.org