1

Using this stack is giving me problems with django compressor and less static files. If I run the django dev server behind nginx there is no problem. If I try gunicorn, I get errors from gunicorn saying it can't find the less files. Why would gunicorn be looking for static files?

4

1 回答 1

0

您还需要以某种方式映射 gunicorn 中的静态文件。在 uwsgi 中,指令是

static-map /static=/var/www/your-project/static

我认为问题在于 Gunicorn 本身无法访问静态文件,因为路由确实只存在于 Nginx 级别。你必须告诉它文件在哪里。

于 2013-03-27T12:15:30.220 回答