自己动手配置PHPNOW

鉴于本人比较懒惰,不愿意自己去花费时间去配置AMP环境,曾经使用过很多套件,但能记得住的就是数年前微米天空的套件,官网站好像已经不再更新,最近用的比较顺手的就是PHPNOW套件,其他套件不是不好,而是本人基本没有使用过,不能妄谈。
PHPNOW套件的网站根目录是在配置目录的htdocs下,但是本人一直习惯于自己定义的虚拟目录,当然你可以在将PHPNOW套件安装完成后再对相关文件进行修改。但我更热衷于一开始就自己去定义,安装完成后不用再进行修改,下面就是我自己的修改过程:

一、找到httpd-2_2.conf文件,做如下更改(可以根据自己的需求更改httpd-2_2.conf文件)
1、查找ServerAdmin admin@phpnow.org,将之改为自己的邮箱;
2、查找DocumentRoot "../htdocs",将之改为DocumentRoot "D:/WEB";//不妨假设你的网站目录是D:/WEB
3、查找《Directory "../htdocs"》,将之改为《Directory "D:/WEB"》

二、找到相应的httpd-vhosts.conf文件,做如下更改:
将DocumentRoot ../htdocs,改为DocumentRoot D:/WEB

三、找到Init.php文件,做如下更改:
1、找到"$str = rpl('@@ServerAdmin@@', 'admin@phpnow.org', $str);",改为"$str = rpl('@@ServerAdmin@@', 'Yourname@example.com', $str);"。
2、找到"$str = rpl('@@ServerRoot@@/htdocs', '../htdocs', $str); ",改为"$str = rpl('@@ServerRoot@@/htdocs', 'D:/WEB', $str); "。
3、找到"$str = rpl('@exp_htdocsdir@', '../htdocs', $str); ",改为"$str = rpl('@exp_htdocsdir@', 'D:/WEB', $str); "。
4、找到"$str = regrpl('^(ServerAdmin).*(\r\n)', "$1 admin@phpnow.org$2", $str); ",改为"$str = regrpl('^(ServerAdmin).*(\r\n)', "$1 Yourname@example.com$2", $str); "。
四、找到Init.cmd文件,做如下更改
1、找到"if not exist htdocs\index.php copy Pn\index.ph_ htdocs\index.php /y",改为"if not exist D:\WEB\index.php copy Pn\index.ph_ D:\WEB\index.php /y"。

php.ini-recommended
可以根据你的要求进行相应的设定

标签: ,

1 Comments:

Blogger Mark  said...

测试一下

2009年6月10日 下午11:54  

点击此处: 添加评论