change main document root
Posted by: comOnBert (---.cable.dynamic.surfer.at)
Date: February 17, 2017 11:29AM

hi, just want to leave here, that if you really want to change the main document root, eg. "c:/wamp64/www" to some other directory, then you have to do the following:
(wampserver version 3.0.6, 64bit)

- change DocumentRoot in httpd.conf
- and in httpd-vhosts.conf
- change $server_dir in index.php
- and in add_vhost.php
- AND change in scripts/config.inc.php $wwwDir to your new absolute path
- AND change also there 5 relative "../" entries to absolute, eg. like "c:/wamp64/wampmanager.conf", because that, however (wrong use of relative paths somewhere), avoids some error-messages ..



Edited 1 time(s). Last edit at 02/17/2017 11:31AM by comOnBert.

Re: change main document root
Posted by: Otomatic (Moderator)
Date: February 17, 2017 02:33PM

Hi,

You complicate matters unnecessarily. In addition, it is a source of error.
The simplest is to use VirtualHost and you can put your local sites wherever you want and each site can be in a different location.
See The need for Virtual Host

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: change main document root
Posted by: RiggsFolly (Moderator)
Date: February 17, 2017 02:33PM

But if you create a Virtual Host for whatever you did this for, you dont have to bother about any of this rubbish.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Sorry, only registered users may post in this forum.