WAMPSERVER does not see my working directory

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.

4 answers

  1. jee pee Posted messages 9437 Registration date   Status Moderator Last intervention   9 973
     
    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.
    0
  2. MARTEGAL Posted messages 35 Status Member 2
     
    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.
    0
    1. jee pee Posted messages 9437 Registration date   Status Moderator Last intervention   9 973
       
      In that case, if you add a directory
      rep1
      under www, the URL should be
      localhost/rep1/fic.php
      to execute the file fic.php.
      0
  3. MARTEGAL Posted messages 35 Status Member 2
     
    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.
    0
    1. jee pee Posted messages 9437 Registration date   Status Moderator Last intervention   9 973
       
      0
      1. jee pee Posted messages 9437 Registration date   Status Moderator Last intervention   9 973 > Pitet Posted messages 2845 Status Member
         
        I also thought about the VH, but then we introduce a new name. I don't use WampServer, but I imagine that it's not going to say "by clicking on Localhost from the green icon" however the new one will be below localhost as seen at the end of the tutorial.
        0
      2. Pitet Posted messages 2845 Status Member 530 > jee pee Posted messages 9437 Registration date   Status Moderator Last intervention  
         
        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
        0
  4. MARTEGAL Posted messages 35 Status Member 2
     
    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!
    0