Wamp 服务器:多个虚拟主机在 Windows 上不工作
我在 windows 上有两个虚拟主机(例如:test1.dev 和 test2.dev).但它总是为两个虚拟主机加载 test1.dev 的内容.
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.
以下是我的文件:
主机:
127.0.0.1 localhost
127.0.0.1 test1.dev
127.0.0.1 test2.dev
httpd.conf:
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:wampwww est1public"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName test2.dev
DocumentRoot "C:wampwww est2public"
</VirtualHost>
有人能认出问题吗?
推荐答案
我猜你在某处遗漏了 NameVirtualHost 127.0.0.1:80
行:)
I'm guessing you're missing the NameVirtualHost 127.0.0.1:80
line somewhere :)
相关文章