用户名:  密码:   
您当前的位置:首页 > 

修改WAMP默认WEB根目录方法

上次修改时间: 2014-12-22 10:04:10      来源:网络总结      作者:钢铁长陈
上一页      路径:DSD\WAMP相关\      下一页

修改WAMP默认WEB根目录方法

1.修改:C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf文件
DocumentRoot "c:/wamp/www/" 改成 DocumentRoot "e:/360cloud/site/www/"
<Directory "c:/wamp/www/"> 改成 <Directory "e:/360cloud/site/www/">
以上修改后WAMP的实际根目录就指向了新的目录位置了。

注:如果改了默认端口,因为修改了C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf文件,
所以还要把这个文件中的相应的目录位置修改新的位置,我出错的地方就是这里没有改
DocumentRoot "C:\wamp\www" 改为 DocumentRoot "e:/360cloud/site/www"
<Directory "C:\wamp\www"> 改为 <Directory "e:/360cloud/site/www/">

下面的作用是左键点击右下角的WAMP图标——www directory会弹出新设的目录
2.修改:c:\wamp\wampmanager.ini文件
Type: item; Caption: "www directory"; Action: shellexecute; FileName: "c:/wamp/www"; Glyph: 2
改为:
Type: item; Caption: "www directory"; Action: shellexecute; FileName: "e:/360cloud/site/www"; Glyph: 2

3.修改:C:\wamp\scripts\config.inc.php文件
把$wwwDir = $c_installDir.'/www'; 改为 $wwwDir ='e:/360cloud/site/www';

注:2和3设置后要退出WAMP再进入才能生次,重启WAMP无作用

http://blog.chinaunix.net/uid-23781137-id-2759236.html