在Tomcat的日常维护中,最常用的配置是添加虚拟主机,在虚拟主机的添加中,有几个点需要知道:
Host: 一个host代表的是一个虚拟主机,
The Host element represents a virtual host, which is an association of a network name for a server (such as "www.mycompany.com") with the particular server on which Tomcat is running. For clients to be able to connect to a Tomcat server using its network name, this name must be registered in the Domain Name Service (DNS) server that manages the Internet domain you belong to - contact your Network Administrator for more information.
默认在tomcat的/conf/server.xml中,host指向localhost
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
appbase : 一个host对应着一个appbase,此目录下的每个文件夹都会被部署为应用,例如tomcat中的webapps目录下的doc,host-ma