The Caddy examples repository has a small entry for Django, which I believe is still correct.
Because Caddy doesn’t have uWSGI functionality, you’ll need some other server to run your script, and then proxy to it via Caddy. In the example, Gunicorn is used.
Thank you for your reply, I checked the link you sent, perhaps I can try to use uwsgi start the project, with caddy monitoring port 80, if successful, I will release a tutorial.
I’ve been looking into using Caddy as a proxy for Django. What I found is that the example isn’t working with the latest version of Caddy. Now I’m a complete beginner with Caddy, but I got this working:
I don’t think the second one is meant to be a header_downstream (you’re sending that back to the client that way).
The easiest and simplest way is actually to use the transparent preset for the proxy directive, which comes with a few headers useful for backends (including Host and X-Forwarded-Proto), and would have been updated along with the changing standard anyway.