server {
    listen 80 default_server;
    server_name {{ nginx_domain_name }};

    location /.well-known/acme-challenge {
        root /var/www/html;
        try_files $uri $uri/ =404;
    }

    location / {
        rewrite ^ https://{{ nginx_domain_name }}$request_uri? permanent;
    }
}
