• GitHub
  • Documentation
  • Discord
  • Tip
search
  • chevron_right Threads
  • label Support

Site avatars aren't loading Anymore

Rotense
Sept. 10, 2018
chat_bubble_outline 9
  • check_circle
  • link
    Rotense
    Members 35 posts
    Sept. 10, 2018, 7:32 p.m. Sept. 10, 2018, 7:32 p.m.
    link

    Few hours ago sites avatars stop showing, how to fix this?

    IMG_20180910_183215_725.jpg

    JPG, 65.9 KB, uploaded by Rotense on Sept. 10, 2018.

    Screenshot_20180910-182013.png

    PNG, 74.2 KB, uploaded by Rotense on Sept. 10, 2018.

  • link
    rafalp
    Project Lead 2028 posts
    Sept. 10, 2018, 7:53 p.m. Sept. 10, 2018, 7:53 p.m.
    link

    Are you using Heroku to host your Misago site? It will not keep user-uploaded files before dyno restarts.

  • link
    Rotense
    Members 35 posts
    Sept. 10, 2018, 8:05 p.m. Sept. 10, 2018, 8:05 p.m.
    link
    @rafalp

    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

  • link
    rafalp
    Project Lead 2028 posts
    Sept. 10, 2018, 8:07 p.m. Sept. 10, 2018, 8:07 p.m.
    link

    Did you clear the media directory per chance? Or maybe restarted nginx/uwisg with wrong config?

  • link
    Rotense
    Members 35 posts
    Sept. 10, 2018, 8:15 p.m. Sept. 10, 2018, 8:15 p.m.
    link
    @rafalp

    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.

  • link
    rafalp
    Project Lead 2028 posts
    Sept. 10, 2018, 8:18 p.m. Sept. 10, 2018, 8:18 p.m.
    link

    "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.

  • link
    Rotense
    Members 35 posts
    Sept. 10, 2018, 8:38 p.m. Sept. 10, 2018, 8:38 p.m.
    link

    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

  • link
    Rotense
    Members 35 posts
    Sept. 10, 2018, 8:57 p.m. Sept. 10, 2018, 8:57 p.m.
    link

    Also, i got this email from Digital Ocean few minutes ago

    fff.PNG

    PNG, 58.0 KB, uploaded by Rotense on Sept. 10, 2018.

  • link
    rafalp
    Project Lead 2028 posts
    Sept. 10, 2018, 9:34 p.m. Sept. 10, 2018, 9:34 p.m.
    link
    check_box

    Marked as best answer by Sept. 10, 2018, 10:15 p.m..

    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 ;)

    Rotense likes this.

    favorite 1

  • link
    Rotense
    Members 35 posts
    Sept. 10, 2018, 10:19 p.m. Sept. 10, 2018, 10:19 p.m.
    link

    Fixed

    I fix this by adding

    location /media/ {
    autoindex on;

    Thanks Man! You're Great! , Wish to join the Misago Dev Sooner! :)

arrow_upward Go to top
  • This site uses cookies to gather statistical data for use in traffic analysis.
  • GitHub
  • Documentation
  • Discord
  • Tip
  • Terms of service
  • Privacy policy
powered by misago