title: Django + Nginx save uploded file to other server and reverse file
body: <p>I have 2 servers: first for Nginx and Django and second server for storage</p>
  
  <pre><code>Nginx and app server IP: 192.168.1.1
  
  storage server IP: 192.168.1.2
  </code></pre>
  
  <p>Nginx installed on two servers.</p>
  
  <p>In Django config media path:</p>
  
  <pre><code>MEDIA_ROOT = os.path.join(BASE_DIR,'media')
  
  MEDIA_URL = '/media/'
  </code></pre>
  
  <p>Nginx config is in the first server:</p>
  
  <pre><code>server {
      listen  80;
      server_name 192.168.1.1;
      access_log /var/log/nginx/access.log;
  
      error_log /var/log/nginx/error.log ;
      location = /favicon.ico { access_log off; log_not_found off; }
  
      location  /media/ {
          proxy_pass http://192.168.1.2/;
      }
  
  
      location / {
          uwsgi_pass  unix:/tmp/uwsgi/app.sock;
          include     uwsgi_params;
      }
  
      location /static/  {
          alias /home/ubuntu/app/static/;
      }
  
  }
  </code></pre>
  
  <p>and storage server Nginx config:</p>
  
  <pre><code>server {
      listen  80;
      server_name 192.168.1.2;
      access_log /var/log/nginx/access.log;
      error_log /var/log/nginx/error.log ;
  
      location /media/  {
        alias /home/ubuntu/app/media;
     }
  }
  </code></pre>
  
  <p><strong>Questions:</strong></p>
  
  <p>How can Django save (upload file) to the storage server (192.168.1.2)?</p>
  
  <p>better if suggest solutions with minimum changes in code.</p>
  
  <p>How Nginx can reverse files from a storage server?</p>
  
  <p>the end user just typing 192.168.1.1</p>