望高手帮忙解决,虚拟主机的问题?

现在我们这里有一台服务器,有两个网卡,分别设不通的ip,相对应不通的域名!
假如是172.16.69.1 --www。abc.com
172。16.69.2--www.123.com
服务程序用Apache1.3.24和tomcat3.2,在d:\tomcat3.2\webapps\abc放www.abc.com网站的内容,d:\tomcat3.2\webapps\123下放www.123.com的内容,现在如何设置虚拟主机(apache和tomcat分别设置什么?)才可以用户输入域名直接访问到相应的主页?谢谢
---------------------------------------------------------------

#Listen 80
Listen 8012

NameVirtualHost 172.16.69.1
NameVirtualHost 172.16.69.2

1<virtualhost 172.16.69.1="">   
2Options FollowSymLinks MultiViews Indexes   
3DirectoryIndex default.php index.htm   
4ServerAdmin [email protected]   
5DocumentRoot d:\tomcat3.2\webapps\abc   
6ServerName www.abc.com   
7ErrorLog d:\tomcat3.2\webapps\abc\logs\error_log.txt   
8CustomLog d:\tomcat3.2\webapps\abc\access_log.txt common   
9</virtualhost>
1<virtualhost 172.16.69.1="">   
2Options FollowSymLinks MultiViews Indexes   
3DirectoryIndex default.php index.htm   
4ServerAdmin [email protected]   
5DocumentRoot d:\tomcat3.2\webapps\123   
6ServerName www.123.com   
7ErrorLog d:\tomcat3.2\webapps\123\logs\error_log.txt   
8CustomLog d:\tomcat3.2\webapps\123\logs\access_log.txt common   
9</virtualhost>
Published At
Categories with Web编程
comments powered by Disqus