惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - 东国先生

MongoDB - 安装及相关资料 8种Nosql数据库系统对比 ffmpeg: error while loading shared libraries: libavdevice.so.53 亚马逊S3 - The difference between the request time and the current time is too large. Imagick setFont() 不能设置字体问题 当Linux中glibc被无意删除后…… vim终端下中文乱码问题 解决Linux中文乱码 Linux下PHP文件操作提示无权限 还原sql server数据库时,无法获得对数据库的独占访问权 zen-cart开发教程 - 通知者/观察者模式 zen-cart开发教程 - 开发Sidebox插件 修改zen-cart下单和付款流程以防止漏单 利用反射设置对象的属性(Property) 【转载】Paypal 标准变量列表 C#中的委托 zen-cart开发教程 - 概述 PHP文件操作函数 2009年终总结
Apache 服务器安装和配置相关资料
东国先生 · 2012-06-27 · via 博客园 - 东国先生

1. 在windows上安装Apache服务

可以在同一台windows服务器上安装多个apache服务器,只要保证端口不重复就可以了

httpd.exe -k install

httpd.exe -k install n "你的服务名称"

httpd.exe -k install n "你的服务名称" -f "D:/httpd.conf"

2. 卸载windows上的Apache服务

httpd.exe -k uninstall

httpd.exe -k uninstall -n "要卸载的服务名称"

3. 在Linux上编译Apache的模块

例如编译:mod_xsendfile模块,使用如下命令

/usr/local/apache/bin/apxs -cia mod_xsendfile.c

编译后,重启Apache服务即可

4. mod_xsendfile模块的配置和使用

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');