Is it possible to pass an uploaded file from an externally facing webserver to an internal server? I do not want to use a share to copy the file after upload if I don't have to. Rather, I'd prefer to post the file from the external server directly to the internal machine. Both machines will be running nginx, and I don't want to expose the internal machine.



Seems like an ideal case for an NFS export (yes, I suppose this technically qualifies as a "share", but why are you averse to this?).

Just export a directory from your internal server and mount it in the location of your uploads directory on the external server. The file will appear instantly on the internal server, and you won't need to mess around with any proxy/double transfer/etc.

Another option would be to use incron to watch for new and/or modified files on the external host and then trigger an scp/rsync over to the internal server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy