windows 2011-8-18 10:39
WAMP 虛擬主機設定方式
首先
1. 編輯 httpd.conf,查找 Include conf/extra/httpd-vhosts.conf,把前面注釋符號“#”刪掉。
2. 找到安裝目錄下 wamp\bin\apache\Apache2.2.17\conf\extra 下 httpd-vhosts.conf 這個文件
3. 把裡面的内容清空掉.舉例換成下面的內容
[quote]
NameVirtualHost *:80
<VirtualHost *:80>
ServerName [color=royalblue]www.aaa.com.tw
[/color]DocumentRoot D:/htdocs/dz
DirectoryIndex index.php index.html index.htm
<Directory "D:/htdocs/dz">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName[color=royalblue] www.bbb.com.tw
[/color]DocumentRoot D:/htdocs/dz2
DirectoryIndex index.php index.html index.htm
<Directory "D:/htdocs/dz2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
[/quote]
4.然後重啟apache,在瀏覽器裡面輸入www.aaa.com.tw 跟 www.bbb.com.tw ,看看設定正不正常囉~~