



























可以在同一台windows服务器上安装多个apache服务器,只要保证端口不重复就可以了
httpd.exe -k install
httpd.exe -k install n "你的服务名称"
httpd.exe -k install n "你的服务名称" -f "D:/httpd.conf"
httpd.exe -k uninstall
httpd.exe -k uninstall -n "要卸载的服务名称"
例如编译:mod_xsendfile模块,使用如下命令
/usr/local/apache/bin/apxs -cia mod_xsendfile.c
编译后,重启Apache服务即可
1).Apache 中的配置:
LoadModule xsendfile_module modules/mod_xsendfile.so
<IfModule xsendfile_module>
<Directory "/var/www/html/myweb/">
XSendFile On
XSendFilePath /var/data/files/
</Directory>
</IfModule>
2).PHP程序:
$file = '/var/data/files/1.zip';
if (!file_exists($file)) {
die("File '$file' doesn't exist.");
}
header("Content-Type:application/octet-stream");
header("X-Sendfile:$file");
header('Content-Disposition:attachment;filename=1.zip');
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。