Apache的配置文件httpd.conf在最后加入下面的代码
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@smallco.example.com
DocumentRoot e:/web1
</VirtualHost>
<VirtualHost 127.0.0.2:80>
ServerAdmin webmaster@baygroup.example.org
DocumentRoot e:/web2
</VirtualHost>
参考文档
http://httpd.apache.org/docs/2.2/vhosts/