Here is the full config of my site:
server {
server_name back.mysite.com;
access_log /home/django/mysite/deploy/logs/nginx_acc.log;
error_log /home/django/mysite/deploy/logs/nginx_err.log;
location / {
uwsgi_pass unix:///tmp/uwsgi.sock;
include uwsgi_params;
}
location /media/sites/ {
alias /web/mysite.com/sites/;
}
location ~ ^/(static|media)/ {
root /home/django/mysite/mysite;
expires max;
log_not_found off;
}
location /sites/ {
root /web/mysite.com;
}
}
Now I can open the first link, but can't open the second of the following
http://back.mysite.com/sites/files/somefile.jpg
http://back.mysite.com/media/sites/files/somefile.jpg #<---can't open but need to
Please, tell me what am I doing wrong.