簡體   English   中英

無法使用球童 + django + gunicorn 提供 static 文件

[英]cannot serve static files using caddy + django + gunicorn

我正在開發一個項目,該項目使用 caddy 作為 web 服務器和代理,django 作為后端,gunicorn 作為 wsgi。 但除了我無法提供 static 文件外,一切都運行良好。

這是我的球童檔案。

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

我使用有什么問題嗎?

如何擺脫@notstatic ,即:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM