Why doesn't it work to tie the static files django/nginx?

Made simple demo_blog. Fails to distribute static files. In settings.py
I have:
STATIC_URL = '/static/'
STATIC_ROOT = '/root/demoblog/static/'

 os.path.join(BASE_DIR, 'static'),

python manage.py collectstatic

in nginx
server {
 listen 80;
 server_name ip_of_my__blog; 
 access_log /var/log/nginx/example.log;

 location /static/ {
 root /root/demoblog/;
 expires 30d;

 location / {
 proxy_set_header Host $server_name;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

My demo_blog is located at /root/demoblog/ on DigitalOcean
I restart nginx sudo service nginx restart
Then run demo_blog gunicorn blog.wsgi:application
It works, but the static is heard. The thing, whatever it?
March 23rd 20 at 18:46
1 answer
March 23rd 20 at 18:48
Nginx have no access to /root, and a django project in that directory is not the place.
Yeah, I thought so. Where the project is to throw? in the home directory? - Hazle.Beier39 commented on March 23rd 20 at 18:51
@Hazle.Beier39in /var/www is possible. - jane_Hessel commented on March 23rd 20 at 18:54

Find more questions by tags NginxDjango