Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wamp Server: Multiple Virtual Hosts are not working on Windows

I have two virtual hosts on windows(for example: test1.dev and test2.dev). But it always load content of test1.dev for both virtual hosts.

Following are my files:

hosts:

127.0.0.1    localhost
127.0.0.1    test1.dev
127.0.0.1    test2.dev

httpd.conf:

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

Include "c:/wamp/alias/*"

<VirtualHost 127.0.0.1>
    ServerName test1.dev
    DocumentRoot "C:\wamp\www\test1\public"
</VirtualHost>

<VirtualHost 127.0.0.1>
    ServerName test2.dev
    DocumentRoot "C:\wamp\www\test2\public"
</VirtualHost>

Can someone recognize the problem ?

like image 620
Awan Avatar asked Mar 27 '10 18:03

Awan


1 Answers

I'm guessing you're missing the NameVirtualHost 127.0.0.1:80 line somewhere :)

like image 161
Wolph Avatar answered Sep 23 '22 05:09

Wolph