Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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:wampwwwest1public"
</VirtualHost>

<VirtualHost 127.0.0.1>
    ServerName test2.dev
    DocumentRoot "C:wampwwwest2public"
</VirtualHost>

Can someone recognize the problem ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
415 views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...