END
方法/步骤4、配置Apache
1. 1
用记事本打开F:\\phptools\\Apache2.4\\Apache24\\conf中的httpd.conf 查
找
ServerRoot
,
修
改
ServerRoot \ache24\(这里输入的是你解压apache安装包后放的位置)
2. 2
查
找
#ServerName www.example.com:80
,
修
改
为 ServerName www.example.com:80 (去掉前面的#)
3. 3
查找DocumentRoot \, 修改为
DocumentRoot \如果一样,就不用改)
4. 4
查
找
, 修 改 为  5. 5  查 找 DirectoryIndex index.html  , 修 改 为 DirectoryIndex index.html index.php index.htm (这里我们添加了index.php index.htm)  6. 6  查为 找 ScriptAlias /cgi-bin/ \ , 修 改  ScriptAlias /cgi-  bin/ \如果一样,也不用改)  7. 7  查 找 修 改 为  8. 8  B.加载php模块到Apache服务器  1.在Apache配置文件httpd.conf中写入以下内容(位置为最后一个 LoadModule的后面,大概在130行的位置):  LoadModule php5_module “C:\\Programs\\php5\\php5apache2_2.dll”   #路径根据实际情况写,引号注意用英文字符    2.同样在Apache配置文件httpd.conf中写入以下内容(位置为最后一个AddType的后面,大概在380行的位置): AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 AddType application/x-httpd-php .php5   9.  10  添加 PHPIniDir \(告诉apache php.ini的位置) 至此,httpd.conf 配置完成,保存httpd.conf 。    END  方法/步骤5、将apache安装到系统服务中