skip to Main Content

i have following problem:
I have some big files on a server who runs under plesk, and i want to exclude them from the regular plesk backup, but as far as i’ve seen this is not possible.

So i would like to store these big files on another server and serve them through the web app which runs on the first server.

The problem is that the url of the files should be hidden for the user. Now i have implemented that with php’s header().
Of course they should be served directly to the user and not through the first server, as the files are really big!

In short, what i need is, when the user clicks the file download link, he should receive the file from the second server, but the file url should not be visible to him.

Im using php for my application and apache as a webserver,
i would be grateful for any suggestions on how to approach this problem,

Harry

EDIT: I forgot to mention that the user has to get acceptance from the first server to download the file. This is why i need the url of the file to be hidden.

2

Answers


  1. You can use the include or require_once function to get the data from those files without actually “viewing” the file.

    Login or Signup to reply.
  2. If the user is receiving a file from server2.domain.com then there is no way to make them think it is coming from server.domain.com unless the file passes through server.domain.com

    If the user is directly requesting the file from the second server then they will be able to find out where it is coming from.

    The only real way to totally hide the evidence of the other server from users is to proxy the file via server 1. You can either do this using a proxy server or by reading and echoing the file via php.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search