I am following the instructions in http://senko.net/en/django-nginx-gunicorn/ to deploy my django application. My application is running under gunicorn and I have configured nginx to serve the site. Everything is fine except that the static files are looked inside a 'static' subdirectory of the actual static file directory.
I have the following stanza for static files in the nginx configuration file:
location /static {
root /webapps/myproject/project_staticfiles;
}
where /webapps/myproject/project_staticfiles is the place where I have all the static files (I use manage.py collectstatic to put the static files there). However, they are not found when the site is accessed at the port configured in nginx configuration. The error.log shows that they are looked in a directory deeper: /webapps/myproject/project_staticfiles/static.
Indeed, when I create a new directory 'static' and put all the static files in there, everything is found. In my project settings.py file I have:
STATIC_URL = '/static/'
STATIC_ROOT = '/webapps/myproject/project_staticfiles'
What is the setting that causes this strange behaviour?