1
votes

I am running virtual host with Wamp server for a website called dev.gamenomad.com. Everytime I go to localhost, the page will redirect to dev.gamenomad.com in C:\wamp\www\dev.gamenomad.com instead of the traditional Wamp server page where you can access each project.

I want to have the welcome page so that I can run other project when I run Wamp server. How can I set up my virtual host for dev.gamenomad.com without affecting the welcome page of Wamp server?

my "host" file

127.0.0.1       localhost
127.0.0.1       dev.gamenomad.com

http-vhost.config

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:\wamp\www\dev.gamenomad.com\public"
    ServerName dev.gamenomad.com
    ServerAlias dev.gamenomad.com
    ErrorLog "logs/dev.gamenomad.com-error.log"
    CustomLog "logs/dev.gamenomad.com-access.log" common
</VirtualHost>
<Directory C:\wamp\www\dev.gamenomad.com>
   Order Deny,Allow   
   Allow from all 
</Directory>

my www folder is in C:\wamp\ , and my Wamp server listen to port 80

wamp traditional welcome page enter image description here

2

2 Answers

0
votes

You need to create one more virtual host of localhost too.

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:\wamp\"
    ServerName localhost
    ErrorLog "logs/error.log"
    CustomLog "logs/access.log" common
</VirtualHost>
<Directory C:\wamp\>
   Order Deny,Allow   
   Allow from all 
</Directory>
0
votes

Adding a new virtual host, should be enough. like SuryaElite suggested with the only addition of the www folder included in the vhost and much simpler.

<VirtualHost *:80>
  ServerName localhost
  DocumentRoot "C:\wamp\www"
</VirtualHost>
<Directory "C:\wamp\www">
  Order Deny,Allow   
  Allow from all 
</Directory>