0
server {
#listen 443;
server_name www.site.md;
location ~* .(jpg|svg|jpeg|gif|png|ico|css|zip|rar|pdf)$ {
root /home/ubuntu/giver;
error_page 404 = 404;
}
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/ubuntu/giver;
}
location/{
include proxy_params;
proxy_pass http://unix:/home/ubuntu/giver/server/giver/giver.sock;
}
location /media {
root /home/ubuntu/giver/server/giver/giver/media; # your Django project's media files - amend as required
}
正如你看到的,我已经添加的路径媒体文件,但他们不加载... 有人可以帮助我,好吗?我的Django 1.10,nginx的,gunicorn使用Ubuntu的16的Django nginx的媒体文件