This blog (and my personal git server) are running on Caddy. No more elaborate certbot-based setup thanks to Caddy’s Automatic HTTPS feature. Couldn’t find a detailed example that sort of shows a good Caddyfile for a single website so here’s mine.

nrawrx3.xyz

log {
        output file /var/log/caddy.log {
                roll_size 1gb
                roll_keep 5
                roll_keep_for 720h
        }
}

root * /blog-root
rewrite /blog /blog/

handle /blog/* {
        file_server
}

handle /css/*.css {
        root * /blog-root/blog/
        file_server
}


handle_errors {
        @404 {
                expression {http.error.status_code} == 404
        }
        redir @404 /blog/404.html
}

handle {
        respond "catch em all"
}