Is an Apache server a good choice to set up in order to be able to intercept all file downloads from a network (acting as a proxy server)?

Also, I'm trying to return a different file to the user. For example a user request a .pdf file and the proxy server intercepts the download and returns a text file to the user. Is Apache capable of doing so?


You should use Squid, not Apache, to do so.

Or, if users are hitting your webserver to download files stored in it, you could create a script written in PHP, perl or whatever to control that for you.

  • the server isn't storing files itself, the goal is to intercept a download and instead of the real file, returning a generated textfile with some extracted metadata in it – keevw Nov 3 '15 at 12:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.