Few hours ago sites avatars stop showing, how to fix this?
Few hours ago sites avatars stop showing, how to fix this?
Are you using Heroku to host your Misago site? It will not keep user-uploaded files before dyno restarts.
No, am using Digital Ocean $10 droplets plan
Did you clear the media
directory per chance? Or maybe restarted nginx/uwisg with wrong config?
No, i didn't Clear the Media dir. I just restarted nginx after i found out the AVATAR disappears.
"I just restarted nginx" is very important piece of information that should've been in original post ;)
You need to check your Nginx setup, looks like its not automatically serving media dir.
upstream mydomain.com {
server unix:/home/gabriel/run/gunicorn.sock fail_timeout=0;
}
server {
listen 80;
# add here the ip address of your server
# or a domain pointing to that ip (like example.com or www.example.com)
server_name 104.248.6666;
keepalive_timeout 5;
client_max_body_size 4G;
access_log /home/gabriel/logs/nginx-access.log;
error_log /home/gabriel/logs/nginx-error.log;
location /static/ {
alias /home/gabriel/rotensep/static/;
}
# checks for static file, if not found proxy to app
location / {
try_files $uri @104.248.6666;
}
location @104.248.6666 {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
# checks for static file, if not found proxy to app
location / {
try_files $uri @104.248.6666;
}
location @104.248.6666 {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://mydomian.com;
}
}
i think my nginx settings is Ok. This is it
Also, i got this email from Digital Ocean few minutes ago
I don't know about e-mail from DO, but your Nginx config is missing entry for location /media/
, which is where user files (like avatars) are uploaded to ;)
Fixed
I fix this by adding
Thanks Man! You're Great! , Wish to join the Misago Dev Sooner! :)