How to Change the www root directory on WampServer 2.5

后端 未结 5 972
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 07:23

My need is to change the default sites directory of wamp from say \"c:\\wamp\\www\" to say \"d:\\sites\". Right now my projects in \"d:\\sites\" do not show in the project l

5条回答
  •  执念已碎
    2020-12-30 07:51

    The thing you wanna do is little bit tricky.To do the thing you want just follow following steps:

    1 Open file C:\wamp\bin\apache\Apache*.*.*\conf\httpd.conf

    2 Find following lines :

    DocumentRoot "c:/wamp/www"
    
    

    3 Modify them to change your root directory /*In my case i want my "C:\" drive as root*/ so i do this :

    DocumentRoot "c:/"
    
    

    4 Now go to c:\wamp\www find index.php and copy it,and pest into your new root /*In my case i want my "C:\" drive as root*/

    5 Now open that index.php and find the following lines:

    $wampConfFile = '../wampmanager.conf';
    $aliasDir = '../alias/';
    

    6 Now just modify them relative to your root /*In my case i want my "C:\" drive as root*/ so i write:

    $wampConfFile = './wamp/wampmanager.conf';
    $aliasDir = './wamp/alias/';
    

    Now it will show the default wamp opening page which is shown in the picture!

提交回复
热议问题