Wamp cannot find any files in root....
Posted by: jimhubbard (---.dhcp.gwnt.ga.charter.com)
Date: August 03, 2012 11:47AM

I added folders to www folder to be able to run several test sites locally.

I added an entry for each in my Win7 hosts file.

I uncommeted "LoadModule vhost_alias_module modules/mod_vhost_alias.so" in http.conf

I restarted WAMP and all is fine with the sites I set up, but now I cannot go to localhost and see the index.php file that was installed with WAMP. It gives me a 404 File Not Found error.

I even placed a dummy html file in www and it also shows a 404 error. It seems that WAMP can no longer see anything in the root of www.

I moved index.php to a "test" folder under www and created an entry for "test" in My Win7 host file, restarted WAMP and it could see the file in "test", but due to the hard coded paths now being off (because the file was moved) it stops with errors.

Why has WAMP stopped seeing anything in the root www folder?

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: RiggsFolly (---.as13285.net)
Date: August 03, 2012 12:24PM

If you activated the vhosts module I assume you created vhosts for all the sites you are using?

If you did the first vhost in the vhosts file has to be to allow access to wamps locahost

## must be first so the the wamp menu page loads
<VirtualHost *:80>
DocumentRoot "D:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "D:/wamp/www">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
</VirtualHost>


Of course you have to leave the original index.php in the c:\wamp\www folder

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.dhcp.gwnt.ga.charter.com)
Date: August 03, 2012 01:32PM

I did not do vhosts. Was advised by a moderator here that changing vhosts was not needed.

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: RiggsFolly (---.as13285.net)
Date: August 03, 2012 03:16PM

Ok,

When wamp is installed it has a index.php file in the c:\wamp\www folder.

That need to stay there in the www folder, its what throws the wamp config page.

Put it back into that folder from the test one you created.


Just out of interest did you play with this setting in the hpptd.conf file?
<IfModule dir_module>
DirectoryIndex index.php index.html index.htm
</IfModule>

If you removed the index.php it may cause some odd happenings.

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: stevenmartin99 (Moderator)
Date: August 03, 2012 03:41PM

wait, i didnt tell you that exactly.


i said if you wanted to follow that video and not use vhosts , that you would need to create a folder in the www called localhost and use this as your "localhost"


the different between vhosts and mod_vhost_alias is that you lose your root folder because in effect you multiple root folders. ( many Document Roots)

where as with plain vhosts ,thw www folder is still set up as the only Document root and the other folders are virtual directories

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.public.wayport.net)
Date: August 03, 2012 11:32PM

RiggsFolly Wrote:
-------------------------------------------------------
> Ok,
>
> When wamp is installed it has a index.php file in
> the c:\wamp\www folder.
>
> That need to stay there in the www folder, its
> what throws the wamp config page.
>
> Put it back into that folder from the test one you
> created.
>
>
> Just out of interest did you play with this
> setting in the hpptd.conf file?
>
> DirectoryIndex index.php index.html index.htm
>
>
> If you removed the index.php it may cause some odd
> happenings.

I did not play with that setting.

Here is what I did....
1 -- removed the hash from in front of "LoadModule vhost_alias_module modules/mod_vhost_alias.so" in the C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf file.
2 -- Created a folder for each site in c:\wamp\www\.
3 -- Added an entry for each folder/site in c:\windows\system32\drivers\etc\hosts.
4 -- Restarted WAMP.

The original thread that I started is at [forum.wampserver.com]

I thought I followed along with what I was being told....but maybe I missed something. My final request as to whether I had done things correctly was never answered there.

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: stevenmartin99 (Moderator)
Date: August 03, 2012 11:48PM

oops i see i didnt write it there, i actually wrote it as a comment under the youtube video! which i think stil hasnt been approved.


anyway like i said, the www folder is no longer the root folder.

so create a folder in the www folder called localhost

c:\wamp\www\localhost


make sure there is a line in the hosts files

127.0.0.1 localhost

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.public.wayport.net)
Date: August 04, 2012 12:12AM

stevenmartin99 Wrote:
-------------------------------------------------------
> oops i see i didnt write it there, i actually
> wrote it as a comment under the youtube video!
> which i think stil hasnt been approved.
>
>
> anyway like i said, the www folder is no longer
> the root folder.
>
> so create a folder in the www folder called
> localhost
>
> c:\wamp\www\localhost
>
>
> make sure there is a line in the hosts files
>
> 127.0.0.1 localhost

I had to change some paths in the index.php file for this to work. And, even after that, it is still not showing it's upper right image or any of my development sites.


Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: stevenmartin99 (Moderator)
Date: August 04, 2012 12:23AM

ok i will rewrite this file and post a download link tomorrow.

Its designed to look for projects in the www as folders , it will need to be modified to look backwards, the issue here is that it will not know the url and will try to use localhost/foldername.

i will try write a function that will use the folder name as the url also


I might even make an upgrade pack for wamp to install this functionality with a small UI for adding sites on the menu. This Module seems pretty useful for quick use of virtual domains

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 08/04/2012 12:26AM by stevenmartin99.

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.sip.asm.bellsouth.net)
Date: August 04, 2012 12:58AM

stevenmartin99 Wrote:
-------------------------------------------------------
> ok i will rewrite this file and post a download
> link tomorrow.
>
> Its designed to look for projects in the www as
> folders , it will need to be modified to look
> backwards, the issue here is that it will not
> know the url and will try to use
> localhost/foldername.
>
> i will try write a function that will use the
> folder name as the url also
>
>
> I might even make an upgrade pack for wamp to
> install this functionality with a small UI for
> adding sites on the menu. This Module seems
> pretty useful for quick use of virtual domains

That would be incredibly useful and simply awesome of you to do!

My sites are working well (with one plugin exception 5 Sec Google Maps - which is throwing a php_curl error that says that I don't have curl enabled, but I do). I have sent the error and a video to the plugin author to see if we can figure that one out.

Thanks so much for your help.

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: stevenmartin99 (Moderator)
Date: August 04, 2012 12:59AM

are you using x64 wamp?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.sip.asm.bellsouth.net)
Date: August 04, 2012 01:39AM

stevenmartin99 Wrote:
-------------------------------------------------------
> are you using x64 wamp?


Yes.

Apache 2.2.22 – Mysql 5.5.24 – PHP 5.3.13 XDebug 2.1.2 XDC 1.5 PhpMyadmin 3.4.10.1 SQLBuddy 1.3.3 webGrind 1.0

from [www.wampserver.com]

on Win7 Ultimate x64 SP1 with all patches and updates.

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: stevenmartin99 (Moderator)
Date: August 04, 2012 01:43AM

curl in php5.3.13 x64 can be a problem depending on your processor

use this extension to solve the issue >> [www.mediafire.com]


open the c:\wamp\bin\php\php5.3.13\ext folder

delete the php_curl.dll and replace with this.


restart Wamp

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 08/04/2012 01:44AM by stevenmartin99.

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.sip.asm.bellsouth.net)
Date: August 04, 2012 02:12AM

stevenmartin99 Wrote:
-------------------------------------------------------
> curl in php5.3.13 x64 can be a problem depending
> on your processor
>
> use this extension to solve the issue >>
> [www.mediafire.com]
> curl-5.3.13-VC9-x64.zip
>
>
> open the c:\wamp\bin\php\php5.3.13\ext folder
>
> delete the php_curl.dll and replace with this.
>
>
> restart Wamp

That fixed it!!!!!

I sent the fix to Gordon at Web Factory Ltd. in hopes that he will add your fix to their FAQ section.

Thanks so much!

Looking forward to the WAMP changes as well.....

BTW....are you in the U.S.? And, do you ever go to Starbucks?

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: stevenmartin99 (Moderator)
Date: August 04, 2012 02:14AM

no I am in Ireland, i go to Starbucks here sometimes....

why?!

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.sip.asm.bellsouth.net)
Date: August 05, 2012 12:25AM

stevenmartin99 Wrote:
-------------------------------------------------------
> no I am in Ireland, i go to Starbucks here
> sometimes....
>
> why?!

Check your email.....

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: stevenmartin99 (Moderator)
Date: August 05, 2012 03:07PM

Jim that was TOTALLY unnecessary!!!

I CANT BELVIEVE YOU DID THAT!

Thank you soo much, i truly appreciate that.

Im shocked!!!

thanks again smiling smiley



Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wamp cannot find any files in root....
Posted by: jimhubbard (---.sip.asm.bellsouth.net)
Date: August 05, 2012 09:42PM

I'm glad you liked it.

Thanks for all of your help here!

Being able to work locally through WAMP (with your help) has saved me a ton of time. I'm sure your changes will help even more people to save time by developing locally instead of through a (sometimes slow) internet connection.

It's people like you that make it possible for people like me to use resources like WAMP to make life a little better for others.

Thanks Steven.



Edited 2 time(s). Last edit at 08/05/2012 10:03PM by jimhubbard.

Options: ReplyQuote


Sorry, only registered users may post in this forum.