首页/Home Web服务器 Installation 安装并配置Apache (Windows)

安装并配置Apache (Windows)

PrintE-mail
Friday, 01 February 2008 17:00  

(假定装到 C:/Apache2.2 目录下)
到Apache官方网站上下载最新版本:http://httpd.apache.org/
下载并安装

Network Domain, Server Name (如果没有的话就随便填一个),
Administrator's Email Address 区域填你的邮件地址

装完毕,配置Apache2.2/conf文件夹下的httpd.conf文件,一般来说,有以下几个地方可能要改:
1. 找到 DocumentRoot ,将其设置为你所要存放php, htm等网页文件的文件夹,如 "D:/PHPSite";
2. 找到 <Directory ,将<Directory "">中引号内地址改为 DocumentRoot 所设的地址;
3. 找到 DirectoryIndex ,在index.html后添加index.php, index.htm等,以单个空格将其分开;


启动或重启Apache,用http://localhosthttp://127.0.0.1测试是否成功。正常的话您可以看到It works。