1. 总结 tomcat实现多虚拟机
#准备数据目录
[root@tomcat ~]#mkdir /data/website{1,2,3}/ROOT -pv
[root@tomcat ~]#vim /data/website1/ROOT/index.html
www.a.com
/data/website1/ROOT/index.html
[root@tomcat ~]#vim /data/website2/ROOT/index.html
www.b.com
/data/website2/ROOT/index.html
[root@tomcat ~]#vim /data/website3/ROOT/index.html
www.c.com
/data/website3/ROOT/index.html
#设置权限
[root@tomcat ~]#chown -R tomcat.tomcat /data/website{1,2,3}/
#修改配置
[root@tomcat ~]#cd /usr/local/tomcat/
[root@tomcat tomcat]#vim conf/server.xml
</Host>
<Host name="www.a.com" appBase="/data/website1/"
unpackWARs="true" autoDeploy="true">
</Host>
<Host name="www.b.com" appBase="/data/website2/"
unpackWARs="true" autoDeploy="true">
</Host>
<Host name="www.c.com"