Read files from two servers

Hi,     in production I have 2 debian servers to which my app is deployed: the first has a public IP and serves as webserver and the second has a private IP and is used for database and other scripts running.

The scripts that are running saves some files on the second server that should be accessed from the first server. Is there an easy way to mount/link (?) the directories I need to be accessed from both servers?

Thanks,        Andrea

An wrote:

Hi,     in production I have 2 debian servers to which my app is deployed: the first has a public IP and serves as webserver and the second has a private IP and is used for database and other scripts running.

The scripts that are running saves some files on the second server that should be accessed from the first server. Is there an easy way to mount/link (?) the directories I need to be accessed from both servers?

Thanks,        Andrea

mount that second server directory into you web server machine (in public) use "sshfs" tool for file mounting , it is very fast

sshfs remote-user@remote.server:/remote/directory /local/machine/remote_directory/

That is what I was looking for!

Thank you very much!

Andrea