Why does not work statics on the server?

Help) Why not ship statics on the server?
the address of the site that is in the way of statics
<link href="/var/opt/blog/static/css/bootstrap.min.css" rel="stylesheet" type="text/css">

in settings.py
STATIC_URL = '/var/opt/blog/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

MEDIA_URL = '/var/opt/blog/media/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
in nginx
location /static/ {
 alias /var/opt/blog/static/;
June 5th 19 at 21:57
2 answers
June 5th 19 at 21:59
Yes, everything is as simple as day.
include logging config to debug level and static works
shut off not working.
surprised, go read the Doc and understand that a statics it is necessary to distribute not janhoy and server type nging, apache, gunicorn or whatever you are using
June 5th 19 at 22:01
porridge you-goal
1) where does MEDIA_ROOT for static? why do you have it? do you understand the difference between them and the purpose of each of them?
<link href="/var/opt/blog/static/css/bootstrap.min.css" rel="stylesheet" type="text/css">

I'm sorry this is a complete PPC
you know how it supposed to work?
3) where does the STATIC_URL and STATIC_ROOT if you are going to distribute a statics of nginx-Ohm?
why are you pointing? you understand their purpose?

Find more questions by tags Django