Issue with static files, content-length: 0

Hi and thanks for Caddy 2 which is awesome. Back to the question, I’m using caddy2_beta20_linux_amd64 as a reverse proxy for a Django app. For some reason I have problems serving static files. Static files are found (http 200), but their size is 0 (header content-length: 0)

This is my conf: {
    @notStatic {
        not {
            path /static*
    root /static/* /home/myuser/project/static
    encode gzip
    reverse_proxy @notStatic unix//tmp/foo.sta.sock {
        header_down Server intentionally-undisclosed-a9564eb

Any help greatly appreciated.

I think it is because you have not enabled static file serving :thinking:

See file_server (Caddyfile directive) — Caddy Documentation

Also the upgrade guide, which mentions this: Upgrading to Caddy 2 — Caddy Documentation

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.