在server。xml 中 如下被指
<!-- default host is forbiden -->
<Engine name="Catalina" defaultHost="forbiden">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
<!-- allow hosts -->
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host>
<Host name="www.yourdomain.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host>
<Host name="192.168.1.3" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host>
<!-- forbiden host, the appBase is a not exists directory. If the requested domain is not in the above list of hosts where are allowed, then use this host. -->
<Host name="forbiden" appBase="notexists" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host>
</Engine>
--------------------------------------------------------------------------
<!-- default host is forbiden --> <Engine name="Catalina" defaultHost="forbiden"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <!-- allow hosts --> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host> <Host name="www.yourdomain.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host> <Host name="192.168.1.3" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host> <!-- forbiden host, the appBase is a not exists directory. If the requested domain is not in the above list of hosts where are allowed, then use this host. --> <Host name="forbiden" appBase="notexists" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host> </Engine>
http://www.cnblogs.com/shanliang/p/3966563.html