I configure nginx by this link .
But django does not see the statics either in the admin or in the project.
#settings.py STATIC_URL = '/static/' STATIC_ROOT = 'djangoenv/static' ls -al /root
#nginx server { server_name detsky-sadik.ru; access_log off; location /static/ { alias /djangoenv/static/; } location / { proxy_pass http://detsky-sadik.ru:8001; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; } } Statics on the server collected. Googling, I tried to add mime.types to /etc/nginx/sites-available/det_sad , but nginx cursed it.
Please help.

/djangoenv/static/, but you don’t most likely havedjangoenvnot at the root of the file system? After all, STATIC_ROOT = 'djangoenv / static' you have this relative path, it means that if you did it in a tutorial, then most likely you should have nginx/opt/djangoenv/static/- Flowneeeopt. Afterrootimmediately go todjangoenv/static. That is, in theory, the path is correct. - Pasha Serchenyals -al /and give a conclusion (put everything into a question, not in a comment), perhaps nginx simply does not have permissions to read this folder - Flowneeedjangoenveating at the root? becauseSTATIC_ROOT = 'djangoenv/static'hints that the folder created bycollectstaticwill lie somewhere relative to the project folder, and not at the root - Flowneee