Mod_xsendfile with url file

The apache mod_xsend file is good for loading a script but I want to download a file with a url like

header("X-Sendfile: http://site.com/a.zip"); 

but that will not work. It shows error 404.

Can you help me with this code?

+4
source share
2 answers

mod_xsendfile does not work. You can send files only on the local file system.

+1
source

I have a precedent where I would like to do just that. Instead of having mod_xsendfile read directly from disk, I need a similar function that instead extracts the file from another Apache instance. The file server RAM will be used to buffer files (to minimize reading disks from multiple files) and will not affect the application server. Perhaps another setting might be JBoss on your own machine and first-level Apache in direct access to the files that will be transferred. But today it is not.

 Internet | Apache as a web server | |-- JBoss for logic (deciding access to files on the | file server and adding extra response headers) | Apache as a file server, only accessible from the "Apache as a web server" | Filesystem 
0
source

All Articles