Ledii
Ledii

Reputation: 261

Alias to localhost folder

I'm trying to setup my WAMP environment again. And I always forget what I have to do to be able to go to "test.dev" insteath of say "localhost/TestProject/index"

What would I have to do to make that work?

Upvotes: 2

Views: 1036

Answers (1)

Leandro Papasidero
Leandro Papasidero

Reputation: 3738

  1. Edit C:\Windows\System32\drivers\etc\hosts as Administrator and add Line

    127.0.0.1 test.dev

  2. Remove the "#" in # Include conf/extra/httpd-vhosts.conf and save and close the httpd.conf file.

  3. Add in C:\wamp\bin\apache\apache2.x.x\conf\extra\httpd-vhosts.conf (where x.x is your apache version)

    <VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot "C:\wamp\www\yourfolder"
        ServerName test.dev
    </VirtualHost>
    
  4. Restart Apache

Upvotes: 2

Related Questions