apache官网自从2.2以后,不再提供windows安装版本,要想安装新的windows版本就只能从其它地方下载或者自己编译了.这里提供一个第三方的windows安装版本
Apache2.4.7版本下载地址:http://www.apachelounge.com/download/
在安装之前先确认电脑是否安装了 VC11 vcredist_x64/86.exe (Visual C++ Redistributable for Visual Studio 2012).如果没有,请先到微软官方下载安装后,再安装apache2.4
apache 2.4 安装步骤如下:
- 下载apache 2.4对应版本,并解压到想要安装的目录下.
- 打开文件 “ Apache24\conf下httpd.conf” .系统默认是安装到 “c:/Apache24″ ,如果不是在默认目录,则用文本编辑器把文件中的所有 ”c:/Apache24″ 替换为自己的安装目录,如” D:Apache24″
- 找到 317行(版本不同,可能有区别)的 ServerName ,把前面的 # 去掉
- 找到 DocumentRoot ,修改网站的根目录,比如是 “D:/www/wordpress”
- DocumentRoot 下方一行的<Directory “D:/Apache24/htdocs”> 做相应修改
配置基本上修改完了.到安装目录下的bin目录中找到 ApacheMonitor.exe ,双击运行,启动apache服务
加入服务的命令为:httpd.exe -k install -n “servicename”
servicename为Apache在windows的服务中的名字。例如:httpd.exe -k install -n “Apache24″
如果要卸载这个服务的话,先要停止这个服务,然后输入httpd.exe -k uninstall -n “Apache24″卸载这个服务。
原文地址:http://blog.xinxi11.com/archives/403.html