mod_xsendfile 介绍
mod_xsendfile 是一个很小的 Apache2 的模块,用来生成 X-SENDFILE 头。If it encounters the
presence of such a header, it will discard all output and send the file
specified by that header instead, using Apache internals including all
optimizations like caching-headers and sendfile or mmap if configured. It is
useful for processing script output of PHP, Perl, or other CGI programs.
配置方法 .htaccess
<Files out.php>
XSendFile on
</Files>