Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.