Using Caddy as reverse proxy for Ghost

Thought I would try something a little different after migrating to a new server and decided to use Caddy rather than Nginx as the reverse proxy and skipped over the offer to set up Nginx in the Ghost CLI setup.

Took a few attempts to get the Caddyfile correct (the Caddyfile hosts the config for everything), but this is what worked in the end:

  GNU nano 7.2                        Caddyfile                         {
        root * /var/www/mytechblog

        reverse_proxy localhost:2368
} {
        root * /var/www/mytechblog

        reverse_proxy localhost:2368


www and / are different paths hence the rule has to be configured for both endpoitns
→ replace var/www/mytechblog with the root of your Ghost installation (!)
→ Caddy automatically provisions the self-signed certs needed for this to work on HTTPS
→ Config worked out of the box for me behdind Cloudflare


I think using caddy as file_server here is a big security issue here.

This allows to be served, right?