• Elvith Ma'for@feddit.org
        link
        fedilink
        English
        arrow-up
        12
        ·
        1 day ago

        For me it was usually that the config that I need to serve a site with TLS is quite short, there are sensible defaults and many things (e.g. websockets) just work without further declaration. That’s especially important if you want to host a container that has some lacking documentation about usage of reverse proxies, as most things “just work fine” for me.

        And using a simple include directive, you can even replicate ‘sites-available’ and ‘sites-enabled’ behaviour. My standard Caddyfile just sets up the log file format and location and basic Let Encrypt values. Then it includes /foo/bar/sites-available/*. Every deployment/container now has its own Caddyfile that just gets linked there.