Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Thoughts?

share|improve this question

1 Answer 1

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

 
discard

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