server {
    listen 80 default_server;

    index index.html;

    if (-d $request_filename) {
        rewrite [^/]$ $scheme://$http_host$uri/ permanent;
    }

    location / {
        try_files $uri $uri/ =404;
    }
}