我經歷了很多帖子閱讀並2點在同一個IP地址配置WAMP如下(httpd.conf中摘錄):本地主機
#Tell Apache to identify which site by name
NameVirtualHost *:80
#Tell Apache to serve the default WAMP server page to "localhost"
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/wamp/www"
</VirtualHost>
#Tell Apache configuration for 1 site
<VirtualHost 127.0.0.1>
ServerName client1.localhost
DocumentRoot "C:/wamp/www_client1"
<Directory "C:/wamp/www_client1">
allow from all
order allow,deny
AllowOverride all
</Directory>
DirectoryIndex index.html index.php
</VirtualHost>
#Tell Apache configuration for 2 site
<VirtualHost 127.0.0.1>
ServerName client2.localhost
DocumentRoot "C:/wamp/www_client2"
<Directory "C:/wamp/www_client2">
allow from all
order allow,deny
AllowOverride all
</Directory>
我也改變了Windows主機文件添加127.0.0.1 client1.localhost等。但是,當我重新啓動WAMP服務時,//client1.localhost和//client2.localhost將轉到c:\ wamp \ www文件夾中的默認站點。
任何幫助真的很感激。
所以,你得到一個警告......你看過嗎?它說什麼? –
警告消息是標準的「虛擬主機127.0.0.1:80與虛擬主機127.0.0.1:80重疊,第一個優先。也許你需要虛擬主機指令」 – user2236230