我正在做一个项目,它使用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
}我是不是用错了什么?
发布于 2021-04-01 22:03:53
去掉@notstatic怎么样,比如:
mydomain.com {
root * /path/to/staticfile/
file_server
encode zstd gzip
reverse_proxy app:8000
}https://stackoverflow.com/questions/66473853
复制相似问题