wampserve修改默认网站目录的方法,wampserve目录1wamp简介
wampserve集成了apache、mysql、php、phpmyadmin,支持apache的mod_rewrite,php扩展、apache模块只需要在菜单“开启/关闭”上点点就搞定,省去了修改配置文件的麻烦,这里就简写成wamp
假设如下:
wamp版本:2.1
wamp2.0安装目录:c:/
www目录:c:/wamp/www/
变更目录:e:/phproot/
一 主要过程:
(1)修改 c:\wamp\bin\apache\apache2.2.17\conf \httpd.conf(实现更改默认网站路径,即将http://localhost定向到自己的默认目录:e:/phproot/)
(2)拷贝并修改index.php(使新默认网站路径中的index.php可以正常显示,如果不需要index.php可以略过此步)
(3)修改c:\wamp\wampmanager.ini和c:\wamp\wampmanager.tpl(改菜单中的“www 目录”指向)
二 具体修改方法全过程:
第一步:修改c:\wamp\bin\apache\apache2.2.17\conf \httpd.conf
查找: documentroot c:/wamp/www/
修改: documentroot e:/phproot/
查找:
修改:
第二步:拷贝并修改index.php
(1)拷贝:
将c:/wamp/www/拷贝至e:/phproot
(2)查找:
//chemin jusqu'au fichier de conf de wampserver
$wampconffile = '../wampmanager.conf';
//chemin jusqu'aux fichiers alias
$aliasdir = '../alias/';
(3)修改:
//chemin jusqu'au fichier de conf de wampserver
$wampconffile = 'c:/wamp/wampmanager.conf';
//chemin jusqu'aux fichiers alias
$aliasdir = 'c:/wamp/alias/';
第三步:修改wampmanager.ini和wampmanager.tpl
1 修改c:\wamp\wampmanager.ini:
(1)打开:c:\wamp\wampmanager.ini
(2)查找:type: item; caption: www 目录; action: shellexecute; filename: c:/wamp/www/; glyph: 2
(3)修改:type: item; caption: www 目录; action: shellexecute; filename: e:/phproot/; glyph: 2
2 修改c:\wamp\wampmanager.tpl:
(1)打开:c:\wamp\wampmanager.tpl
(2)查找:type: item; caption: ${w_wwwdirectory}; action: shellexecute; filename: ${wwwdir}; glyph: 2
(3)修改:type: item; caption: ${w_wwwdirectory}; action: shellexecute; filename: e:/phproot; glyph: 2
完成所有步骤,保存文件,至此修改成功。
http://www.bkjia.com/phpjc/1043034.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/1043034.htmltecharticlewampserve修改默认网站目录的方法,wampserve目录 1wamp简介 wampserve集成了apache、mysql、php、phpmyadmin,支持apache的mod_rewrite,php扩展、apache模块只...