MidCOM 3 supports now X-Sendfile
Posted on 2008-09-01 12:54:10 EEST.
Normally serving files directly from PHP can be quite resource consuming. X-Sendfile provides an alterntive way to serve files from PHP script. It's quite simple, you just send one more header line after setting your content type.
Apache's X-Sendfile module then intercepts the header and does it magic. Module also provides caching headers etc to the browser.
Setting things up is simple
- Download the module from mod_xendfile's page
- Compile and install it in your apache and do apache restart
- Add following line to your MidCOM 3's configuration
- enable_xsendfile: true
Pros:
- Fast and low memory consuption when serving very large attachements
- Allow using ACL's before serving
- Not an official apache module. Needs some tweaking.
- File or any file is served without any intervention of Midgard or Midcom. So if you xsendfile directly, be careful!
