我把我的一部分配置文件给你一份:
NameVirtualHost 10.0.0.2
<VirtualHost 10.0.0.2>
DocumentRoot "E:/Dzh/websit/nyber"
ServerName www.nber.com
DirectoryIndex index.htm
Alias /studydhtml/ "E:/Dzh/websit/nyber/study/"
</VirtualHost>
<VirtualHost 10.0.0.2>
DocumentRoot "E:/Dzh/websit/Apache"
ServerName www.apache.org
DirectoryIndex php.php
</VirtualHost>
NameVirtualHost 192.168.0.1
<VirtualHost 192.168.0.1>
DocumentRoot "E:\myjava\applet"
ServerName www.myjava.com
DirectoryIndex index.php
</VirtualHost>
这三个ip是我网卡邦定的,www.nber.com、www.apache.org、www.myjava.com这三个不用我说了吧

解决方案 »

  1.   

    那这个和端口有关系么?我按照你的修改了httpd.conf,但是在ie里头犍入servername的时候,机器到internet上面去找了。我如何实现127。0。0。1:80提供一个WWW服务,同时,在另外的PORT上又提供另一个WWW服务?这个和虚拟主机有关么?
      

  2.   

    我找到了一个办法,再装一个apache还有别的办法么?
      

  3.   

    完成了对httpd的修改以后,还需要在dns上面做一下添加工作。把 这些虚拟主机的名字添加到dns里面。
    nt,2000都可以做域名服务器的。
    :)