V
V
Vampre2018-09-28 13:35:01
Django
Vampre, 2018-09-28 13:35:01

Why files are not loaded from media on VPS?

What am I doing wrong, please tell
me: mysite_nginx:

upstream admin {
    server unix:///home/admin/mmasite/uwsgi_nginx.sock;
}

server {
    listen 80;
    server_name mydomen;
    charset utf-8;

    client_max_body_size 75M;

    location /media/ {
        root /home/admin/mmasite;
    }

    location /static/ {
        root /home/admin/mmasite;
    }

    location / {
        uwsgi_pass admin;
        include /home/admin/mmasite/deployment/uwsgi_params;
    }
}

settings.py:
STATIC_URL = '/static/'
STATIC_ROOT = '/home/admin/mmasite/static/'

MEDIA_URL = '/media/'
MEDIA_ROOT = '/home/admin/mmasite/media/'

Tried both root and alias - media content doesn't want to load

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question