WAMPSERVER does not see my working directory
MARTEGAL
Posted messages
35
Status
Member
-
MARTEGAL Posted messages 35 Status Member -
MARTEGAL Posted messages 35 Status Member -
Hello everyone,
I just installed WAMPSERVER 3.2.6 64 bits and everything seems fine since the little icon at the bottom is green. Additionally, I added a directory to the www folder to work on. In this directory, I placed a .php file.
Unfortunately, I can't access this directory when I click on LOCALHOST in the Wampserver window at the bottom. So I can't run my .php file.
What did I miss, and how can I resolve this?
Thank you in advance for your responses.
I just installed WAMPSERVER 3.2.6 64 bits and everything seems fine since the little icon at the bottom is green. Additionally, I added a directory to the www folder to work on. In this directory, I placed a .php file.
Unfortunately, I can't access this directory when I click on LOCALHOST in the Wampserver window at the bottom. So I can't run my .php file.
What did I miss, and how can I resolve this?
Thank you in advance for your responses.
4 answers
-
Hello,
Normally the www directory already exists after installation, for example C:\wamp64\www. You don't have to add it, maybe you're not in the right place.
--
a stranger is a friend we haven't met yet. -
OK, but I didn't add the WWW directory, I added a subdirectory to WWW. And that's the one I can't see with localhost.
Thank you for your interest in my question. -
OK, thanks. But is there a way that from the small green Wamp icon, I can directly go to my subdirectory? In fact, is it possible (by adjusting a setting) that by clicking on Localhost from the green icon, I go directly to the files in my subdirectory?
Thanks again.-
- The recommended solution by WampServer is to use the Virtual Hosts of the Apache web server.
The official documentation: http:// forum.wampserver.com/read.php?1,124502
A less detailed but shorter tutorial: https://agence-web.cubis-helios.com/wamp-creer-un-nouveau-vhosts-domaine-sous-domaine/ - Indeed, vhosts allow the use of a different name than localhost for development (for example, http://projet1/ instead of http://localhost/), as often we will need to have multiple projects each with its own URL in WampServer.
If there is only one project and it needs to be accessible at the URL http://localhost/, the link you posted to change the www directory seems more suitable. We could also simply place the site files in the default installed www folder ;)
Instead of WampServer, a simpler alternative might be Laragon which, unless I’m mistaken, works pretty much the same way and where the creation of virtual hosts is automatic.
I use it rarely so this needs to be verified, but it seems to me that creating a folder named "projet1" in the www directory of Laragon automatically creates a vhost to make the folder accessible via the URL http://projet1.test
-
-
Hi everyone,
A big thank you for your replies. In the end, I managed to get it working with VirtualHost. I was able to declare my subdirectory and it works.
Have a great day everyone!