Apache+php5

时间:2014-05-25 15:33:18   收藏:0   阅读:345
bubuko.com,布布扣
1.下载回来的是解压文件,解压好放到要安装的位置。(我这里以D:\Acpache24为例) 

2.打开Apache24\conf下httpd.conf 文件,用记事本打开即可。 

(1)第37行ServerRoot "c:/Apache24"改为ServerRoot “D:/Apache24”;//Apache程序的位置。 
2)第204行的ServerAdmin改不改无所谓; 

(3)第213行ServerName前面的“#”号去掉; 

(4)第237行DocumentRoot "c:/Apache24/htdocs"改为DocumentRoot "D:/www"//网站的根目录 

        第238行<Directory "c:/Apache24/htdocs">改为<Directory " D:/www ">; 

注意:这个WWW文件夹要自己去新建的,不建的话会报错的。 

(5)第271行DirectoryIndex index.html改为DirectoryIndex index.html index.php index.htm   //支持更多的默认页 
6)第354行 ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"改为ScriptAlias /cgi-bin/ "d:/Apache24/cgi-bin/"7)第370行<Directory "c:/Apache24/cgi-bin">改为<Directory "D:/Apache24/cgi-bin"> 
bubuko.com,布布扣

安装到服务里

bubuko.com,布布扣
这里加入服务的命令为:httpd.exe -k install -n "servicename" 
bubuko.com,布布扣

装载PHP模块

bubuko.com,布布扣
# php5 support
LoadModule php5_module "d:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "d:/php"
bubuko.com,布布扣

 

Apache+php5,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!