Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Change the www root directory on WampServer 3

Tags:

php

apache

wamp

How can i change the root directory of the currently installed wampserver to some other directory. I have change directory location from httpd.conf like. I am using Hash tag before Dcoument root, and Directory but for new root i have new line without hash tag.

#DocumentRoot "c:/wamp64/www"
DocumentRoot "G:/04-WebSites/NEW_WORK"
#<Directory "c:/wamp64/www/">
<Directory "G:/04-WebSites/NEW_WORK/">

C:\wamp64\bin\apache\apache2.4.18\conf\httpd.conf

after many time restart server, pc, wamp server still showing www/index page.

index page is shown

like image 620
Morgan Al Qurm International Avatar asked Aug 01 '16 19:08

Morgan Al Qurm International


People also ask

Where is www folder in Wamp?

If you installed WAMP to c:\wamp then I believe your webserver root directory would be c:\wamp\www , however this might vary depending on version. Yes, this is where you would put your site files to access them through a browser. Save this answer. Show activity on this post.

How do I change my VAR www?

Open the file /etc/apache2/apache2. conf and search for <Directory /var/www/> and replace to your directory. Open file /etc/apache2/sites-available/000-default. conf, search for DocumentRoot /var/www/html and replace it with your DocumentRoot.

How do I change the root of a website?

You can change the document root directory by moving the contents of the public_html directory to another directory, and then creating a symbolic link that points public_html to the new document root directory.


2 Answers

You need to change these values also in httpd-vhosts.conf located in \conf\extra

like image 134
Salahaddin Alprof Avatar answered Nov 09 '22 06:11

Salahaddin Alprof


  1. Open wampserver 3 .
  2. Select the Apache menu -> httpd-vhosts.conf.
  3. Change the DocumentRoot path --> "${INSTALL_DIR}/www" to your folder location e.g. "E:/www"
  4. Restart the Wampserver
  5. Done.

For detail blog go here : https://phantomthemes.com/how-to-change-the-www-root-directory-on-wampserver-3/

let me know if it doesn't work

like image 43
Phantom Themes Avatar answered Nov 09 '22 06:11

Phantom Themes