Caddy gives errors on the most basic Caddyfile?

Okay so I’ve fixed this for me. The issue was that caddy wasnt using the correct config file. To be sure use the command (Even if you are in the same directory as the Caddyfile)

sudo caddy start --config Caddyfile