server {
    listen 80 default_server;
    listen [::]:80 default_server;


    location /.well-known/acme-challenge/ {
        root /srv/acme-http-challenge;

        # trun off the log
        access_log off;
        log_not_found off;

        # send to cdn: do not cache this content
        expires off;
        add_header Cache-Control "no-cache, no-store, must-revalidate";

        default_type text/plain;
    }
    
    # rediret
    server_name _ ;
    location / {
        return 308 https://$host$request_uri;
    }
}