Debug = True вот когда обращаюсь к картинке адрес.ком/media/media/atmz.jpeg то nginx дает 404 именно nginx а не django куда копать ?
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
.....
]
server {
server_name mdnss.net;
listen 80;
location /static/{
root /opt/Voe/tgv/;
}
location /media/{
autoindex on;
alias /opt/Voe/media/;
}
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
location / {
proxy_pass http://127.0.0.1:8000;
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;
}
}
STATIC_ROOT = '/opt/Voe/tgv/static/'
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = '/opt/Voe/'
CKEDITOR_UPLOAD_PATH = "media/"
CKEDITOR_IMAGE_BACKEND = "pillow"