无法使用 caddy + django + gunicorn 提供静态文件

问题描述

我正在开发一个项目,该项目使用 caddy 作为 Web 服务器和代理,使用 django 作为后端,使用 gunicorn 作为 wsgi。 但一切正常,除了我无法提供静态文件。

这是我的 Caddyfile。

mydomain.com {
    root * /path/to/staticfile/
    file_server
    encode zstd gzip
    @notstatic {
        not path /path/to/staticfile/*
    }
    reverse_proxy @notstatic app:8000
}

我用的有什么问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)