httpd.conf problem with root directory
Posted by: dstoltz (---.all.ptd.net)
Date: August 26, 2016 04:49PM

I have a new install of latest version of WAMP.

I would like to have the root folder "d:/wamp/www/" to basically allow everything for all folders in it. I can't seem to make this happen....

I can however give folders in it whatever rights I need to like this:

<Directory "d:/wamp/www/folder1/">
Options FollowSymLinks
AllowOverride All
DirectoryIndex default.php
Require all granted
</Directory>

But I don't want to add the above code for every folder I add to the root.

I've tried adding the following, but this still doesn't work:

DocumentRoot "d:/wamp/www"
<Directory "d:/wamp/www/">
AllowOverride All
Require all granted
</Directory>

Thanks for any advice on this.

Options: ReplyQuote
Re: httpd.conf problem with root directory
Posted by: Otomatic (Moderator)
Date: August 26, 2016 05:37PM

Hi,

Use VirtualHost : The need for Virtual Host

For DirectoryIndex, you can modify httpd.conf:
<IfModule dir_module>
    DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>

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



Edited 1 time(s). Last edit at 08/26/2016 06:24PM by Otomatic.

Options: ReplyQuote
Re: httpd.conf problem with root directory
Posted by: dstoltz (---.mah.ptd.net)
Date: August 26, 2016 08:43PM

Strange, I wasn't using Virtual Hosts before - not sure why I need to use these now, unless something has changed with the later versions of WAMP.

Can you explain why it doesn't work with what I currently have in the httpd.conf file?

Options: ReplyQuote
Re: httpd.conf problem with root directory
Posted by: RiggsFolly (Moderator)
Date: August 26, 2016 09:50PM

If you have the skills to make it work however you want to make it work then thats fine, go ahead.

However if you want any support from this site, Virtual Hosts are considered the best way to go for many reasons. None of which I can be bothered to mention at this time. Its the 'if you want support' bit that shoudl catch your attention.

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

Options: ReplyQuote
Re: httpd.conf problem with root directory
Posted by: dstoltz (---.mah.ptd.net)
Date: August 29, 2016 02:12PM

That's fine - I wasn't trying to be a rebel - I was merely asking a question. I'm not a WAMP expert, and since I wasn't doing it that way before (perhaps incorrectly), I didn't know if I had it previously set up wrong.

I will check out the virtual hosting. Thanks.

Options: ReplyQuote


Sorry, only registered users may post in this forum.