在配置tomcat虚拟主机时候,如何每一个虚拟主机写成单独文件,server.xml包含这些子文件? 如以下《》中,添加JAVA环境虚拟主机后tomcat配置文件详情:
/usr/local/tomcat/conf/server.xml
]>&localhost-vhost; &java.linuxeye.com-vhost; &demo.linuxeye.com-vhost;
注:在<server>元素前添加如下格式:
]>
并在<Engine>…</Engine]引用它(localhost-vhost)即可。
下面是每个单独虚拟主机文件:
/usr/local/tomcat/conf/vhost/localhost.xml/usr/local/tomcat/conf/vhost/demo.linuxeye.com.xml
/usr/local/tomcat/conf/vhost/java.linuxeye.com.xml
java1.linuxeye.com