我在
Windows上有两个虚拟主机(例如:test1.dev和test2.dev).但它总是为两个虚拟主机加载test1.dev的内容.
以下是我的文件:
主机:
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>
有人能认出这个问题吗?
我猜你错过了某个地方的NameVirtualHost 127.0.0.1:80线:)