title: nginx and nodejs serve images from dynamic folder
body: <p>Hi i have this nginx setup:</p>
  
  <pre><code>server {
  listen 80;
  server_name xxxxxx.xx www.xxxxxxx.xx;
  root /home/xxxx/public_html;
  
  location / {
      proxy_pass http://127.0.0.1:3000;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
      proxy_http_version 1.1;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $host;
      #proxy_redirect off; 
      #proxy_cache_bypass $http_upgrade;
    }
  }
  </code></pre>
  
  <p>My app creates folders inside the uploads/user followed by the user's ID and then stores images into it. Every user have his own folder inside uploads/user/xxxx.</p>
  
  <p>ex.</p>
  
  <pre><code>/uploads/user/5878db663e67e3535a47c638/1085.github-logo.png
  </code></pre>
  
  <p>The app works fine in browser but when the user uploads the image it cannot be displayed so a 404 rises.</p>
  
  <p>what can i do?</p>