# HTTP for LetsEncrypt
server {
    listen [::]:80 default_server;
    server_name {{ domain_name }};

    location /.well-known/acme-challenge {
        root /usr/share/nginx/letsencrypt;
        try_files $uri $uri/ =404;
    }

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