[Django]-Static files with gunicorn, django and nginx

4👍

That seems you have wrong root setting.

root /Users/danielrodriguez/workspace/mtt/static;

You should check the requested URL for your css files. Assumimg you have STATIC_URL = '/static/' you’re browser will probably want to load /static/css/styles.css or something like that.

So, the file ./static/css/styles.css should be found in root directory.

Then right root should be:

root /Users/danielrodriguez/workspace/mtt;

Of course that’s really not good idea to make root setting to your project root. So’ you may create symlink for static and media to separate dir outside your project.

Hope that helps.

Leave a comment