Wampserver ignores new www directory
Posted by: Serellyn (---.dsl.cambrium.nl)
Date: July 07, 2016 10:17AM

Goodmorning everybody,

First off some global information.
OS: Windows 10 Pro x64
Wamp: 3.0.4 x64
PHP: 7.0.4
Apache: 2.4.18
MySQL: 5.7.11
Error logs: no reports here.
Server icon is green, it is running, that is not the issue.


Problem
After experiencing a bug with a previous wampserver version I decided to fully uninstall the previous and install a new version of Wamp. All went well, the bug I experienced has been fixed. But now I can't change my 'www' directory. Well, I can change it, but it does nothing. I changed the httpd file but it still uses the index in the wamp www directory instead of my custom directory.

What I did:
I opened the file: C:\wamp64\bin\apache\apache2.4.18\conf\httpd.conf.
Changed these 2 lines to the following: DocumentRoot "g:/Web Development/" <Directory "g:/Web Development/">. Then I've copied all the content from the original www to the new custom www and changed the server_root in the index.

Now, I've restarted the server... But it still takes the index file of the original www root instead of the new one. So it seems that wampserver completely ignores changes in the httpd.conf file.

Anyone knows what's going on here? Thank you in advance.



Edited 1 time(s). Last edit at 07/07/2016 10:18AM by Serellyn.

Options: ReplyQuote
Re: Wampserver ignores new www directory
Posted by: Otomatic (Moderator)
Date: July 07, 2016 11:23AM

Hi,

localhost must be ALWAYS wamp/www/ and cannot be changed.
wamp/www/ cannot be deplaced.

You need to use VirtualHost for your local sites : The need for Virtual Host

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

Options: ReplyQuote
Re: Wampserver ignores new www directory
Posted by: Serellyn (---.dsl.cambrium.nl)
Date: July 07, 2016 01:22PM

Really? I find that kind of odd since I did the same with my old server where the path of my custom www folder was 'g:/Web Development/'

Also see: [webmasters.stackexchange.com]
or
[www.youtube.com]

Options: ReplyQuote
Re: Wampserver ignores new www directory
Posted by: RiggsFolly (Moderator)
Date: July 07, 2016 01:31PM

You can do those things, there are lots of ways to skin this cat, BUT, it is so much more clean and elegant to use Virtual Hosts to do this.

We recommend and therefore try and support the use of Virtual Hosts.

See here for some help doing this and some reasons why we consider it a good idea

---------------------------------------------------------------------------------------------
(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-



Edited 1 time(s). Last edit at 07/07/2016 01:32PM by RiggsFolly.

Options: ReplyQuote
Re: Wampserver ignores new www directory
Posted by: Otomatic (Moderator)
Date: July 07, 2016 02:55PM

Hi,

webmasters.stackexchange.com and youtube and other sites tell a lot of bullshit about Wampserver. He who knows what can be done is the developer.
Don't modifiy httpd.conf
Don't modifiy wamp/www/
Don't modify localhost


The one and only way is to use VirtualHost as almost all hosters.

You can very well use g:/Web Development/' as a folder for your local sites, provided you use the VirtualHost.

I use seven different locations for local sites and even a network drive:
DocumentRoot //192.168.0.11/Public/sites/my-site12

I'm a bit fed up because it's shown on the Internet is necessarily the truth.
The only person who:
- Supports Wampserver,
- Adds functionality,
- Fixes for problems,
- Built installers,
- Etc.
it's me, then, please, please consider that I said, or that RiggsFolly said, worth more than anything you can find elsewhere, other than on this forum.

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

Options: ReplyQuote
Re: Wampserver ignores new www directory
Posted by: Serellyn (---.dsl.cambrium.nl)
Date: July 11, 2016 10:05AM

First of all, thanks for the answers.

And Otomatic, I'm sorry if you got offended, I didn't mean to.

I will take a look at virtual hosts as this is the way to go as you said. But as I said before, I had it working on an earlier version just by modifying the httpd.conf and index.php. So don't write this off as untruth.

Options: ReplyQuote
Re: Wampserver ignores new www directory
Posted by: Otomatic (Moderator)
Date: July 11, 2016 10:25AM

Hi,

> I had it working on an earlier version just by modifying the httpd.conf and index.php.
> So don't write this off as untruth.
It worked with prehistoric local servers. Apache has evolved operating systems too, security measures become increasingly strong and it is now necessary to respect the rules.
As I wrote in another post:
Data processing in general and in particular HTTP servers do not support "roughly".
You can not change the "stuff" in haphazardly and hope it will work just like a magic wand.
It requires to be rigorous, methodical, pragmatic, rational and logical; and especially to understand what we do and why we do it.

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

Options: ReplyQuote


Sorry, only registered users may post in this forum.