C:WINDOWSsystem32driversetchosts
127.0.0.1 localhost
192.168.0.100 abc
127.0.0.2 a
2.修改apache的虚拟目录
C:xamppapacheconfextrahttpd-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
<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
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!