How to Change the www root directory on WampServer 2.5

c0der picture c0der · Jul 26, 2015 · Viewed 36.9k times · Source

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 list:

enter image description here

I found a few past answers like this one and this one which I think are not applicable to WampServer 2.5 (anyway, it did not work for me).

I also found this procedure in the documentation, but it seems far too complex for what I need.

Any help on this matter would be appreciated.

Answer

psycho brm picture psycho brm · Aug 31, 2016

In newer version of wamp, changing DocumentRoot in httpd.conf did not change DOCUMENT_ROOT. Even after restarting, it stayed as "c:/wamp64/www/".

Instead, the DocumentRoot is set in this file:

  c:\wamp64\bin\apache\apache2.4.18\conf\extra\httpd-vhosts.conf

To change the localhost directory, change these to your path:

      DocumentRoot c:/www
      <Directory  "c:/www/">