当前位置: 首页 > 软件库 > 服务器软件 > Apache模块 >

mod_xsendfile

授权协议 未知
开发语言 C/C++
所属分类 服务器软件、 Apache模块
软件类型 开源软件
地区 不详
投 递 者 佟阳焱
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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>

  • 概要 把mod_xsendfile导入到Apache中 这样做了之后,Apache的公开的目录下面的任何文件都可能被下载。 比如: Apache的公开目录默认是  /var/www/html 但是相对于mod_xsendfile /data/samba/share/xx 上面的这个目录里面的文件都可以被下载。 导入的步骤 事先确认事项 事先,确认Apache中是否已经导入好了 [root@cent

  • 说明: 在apache服务器中提供一个文件下载,一般使用一个url指向服务器中的文件即可提供下载。 缺点:不能进行统计,权限检测等操作。 1,一般使用php提供下载,例如: 复制代码代码示例: $file = ‘test.zip‘; if(file_exists($file)){ header(‘content-type:application/octet-stream‘); header(‘co

  • 下载是 常用的功能,最近做一个带有扣除积分功能的下载模块~ 为了保证性能和考虑到服务器压力决定使用mod_xsendfile 模块进行下载 1、下载模块 mod_xsendfile.c 下载的地址 https://tn123.org/mod_xsendfile/ 2、mod_xsendfile.c 文件需要重新编译 将下载的 mod_xsendfile.c 复制到 /usr/local/apach

  • 最近有一个新的需求   提供用户下载系统的镜像文件(1.6G的一个zip文件) 1 首先用了很挫的php读取文件的方式   一下载整个server就blocked在那边 2 去看了下range   发现它是用来实现断点续传的,也可以把大文件分成好几段传 似乎可以解决问题 试了下 还是不太好用 3 最后尝试了mod_xsendfile   很好地解决了这个问题 1) 安装apache模块扩展工具ap

  • 服务器提供一个文件下载,一般使用一个url指向服务器中的文件即可提供下载。 但这样就不能进行统计,权限检测等操作。 因此,一般使用php提供下载,代码如下: <?php $file = 'test.zip'; if(file_exists($file)){ header('content-type:application/octet-stream'); header('content-disp

  • 今天在架设lamp服务器后,发现apache 未按照xsendfile模块,于是查找资料按照如下: 安装apache xsendfile模块 yum install mod_xsendfile   转载于:https://www.cnblogs.com/niun/p/5127000.html

  • apt-get install libapache2-mod-xsendfile 同理其它的mod都可以这样安装

相关阅读

相关文章

相关问答

相关文档