[Django]-Serving static and media files on a distant server with Django and Nginx

5👍

You need some way of providing a route to show those files.

One way of doing so would be to install nginx on the remote servers and proxy to it just as you do with the app itself.

An alternative, since you say this is all within the same local network. would be to use something like NFS to mount the static directories onto the proxy server, so that the existing nginx could serve them directly.

A similar option would be to configure the staticfiles app, as well as the storage of user-uploaded files, to save their files directly on the proxy.

Leave a comment