Imagine the following situation: I have a distant server for a website. And I have local servers with a reverse proxy where large files (like videos) are uploaded at off-peak time.
Now I want the reverse proxy to serve a requested file from the local filesystem if the file exists, or from the distant server otherwise. Is there a simple solution to achieve this ?
edit: For the moment i'm using nginx, but it can be changed.