Nginx not serving static files

Hi everyone I am trying to upload a application using Nginx, Gunicorn, Django application run fine in development environment but for production it does not serves static files. I tried hard but failed to find any solution so I am posting here.Here is my NGINX configuration

Nginx

Here is my settings.py

Settings.py

Here are the results of running python manage.py collectstatic no problem all static files are collected properly

static files

Here are all the templates and html files those I am using

base

some more

base 2

more html html

Here is the full directory structure of my project

structure

why Nginx is not accessing 'root' directory when I am collecting all static files into it. it accesses 'static' directory and throws following errors in the error log

exception

why it is not accessing root directory that is suppose to have permissions for access

Вернуться на верх