1.修改windows 域名
C:\WINDOWS\system32\drivers\etc\hosts
127.0.0.1       localhost

192.168.0.100   abc
127.0.0.2    a

2.修改apache的虚拟目录
C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
 ServerName tradesns
 DocumentRoot D:/tradesns
 <Directory D:/tradesns>
  Options FollowSymLinks IncludesNOEXEC Indexes
  DirectoryIndex index.html index.htm default.htm index.php default.php
  AllowOverride all
  Order Deny,Allow
  Allow from all
 </Directory>
</VirtualHost>

 

<VirtualHost 127.0.0.2:80>
 ServerName a
 DocumentRoot D:/tradesns2
    <Directory D:/tradesns2>
     Options FollowSymLinks IncludesNOEXEC Indexes
     DirectoryIndex index.html index.htm default.htm index.php default.php
     AllowOverride all
     Order Deny,Allow
     Allow from all
    </Directory>
</VirtualHost>

posted on 2009-12-28 16:05  Dufe王彬  阅读(232)  评论(0编辑  收藏  举报