我已經安裝WAMP的服務器,它工作正常 然後我嘗試虛擬主機有了它,它不工作虛擬主機上沒有WAMP服務器工作
在httpd.conf文件中我添加這些行
Listen 8081
Listen 8082
Include conf/extra/httpd-vhosts.conf
而在的httpd-vhosts.conf
NameVirtualHost *:80
Listen 8081
Listen 8082
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.localhost"
ServerName dummy-host.localhost
ServerAlias www.dummy-host.localhost
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" common
</VirtualHost>
<VirtualHost localhost:8081>
ServerName localhost:8081
DocumentRoot "D:/wamp/www/project/"
Alias /index.html D:/wamp/www/project/index.php
</VirtualHost>
<VirtualHost localhost:8082>
ServerName localhost:8082
DocumentRoot "D:/wamp/www/project1/"
Alias /index.html D:/wamp/www/project1/index.php
</VirtualHost>
您只能從運行服務器的本地計算機上嘗試?因爲`localhost`與`127.0.0.1`(IPv4)和`:: 1`(IPv6);-)靜態關聯。所以如果你試圖從另一臺機器訪問它,你會遇到麻煩。 – thedom 2011-01-07 12:48:08