Server. xml configuration file:
In
<Engine name = "Catalina" defaulthost = "localhost">
<Valve className = "org. apache. catalina. valves. RemoteAddrValve" allow = "" deny = "10.130.14.142, 10.130.14.49"/>
Note: access to the Tomcat server from 10.130.14.142 and 10.130.14.49IP addresses is denied.
<! -- For clustering, please take a look at documentation:
/Docs/cluster-howto.html (simple how)
/Docs/config/cluster.html (reference documentation) -->
<! --
<Cluster classname = "org. Apache. Catalina. Ha. tcp. simpletcpcluster"/>
-->
<! -- The request dumper valve dumps useful debugging information about
The request and response data were ed and sent by Tomcat.
Documentation at:/docs/config/valve.html -->
<! --
<Valve className = "org. apache. catalina. valves. RequestDumperValve"/>
-->
<! -- This Realm uses the UserDatabase configured in the global JNDI
Resources under the key "UserDatabase". Any edits
That are saved med against this UserDatabase are immediately
Available for use by the Realm. -->
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"
ResourceName = "UserDatabase"/>
<! -- Define the default virtual host
Note: The XML Schema validation will not work with Xerces 2.2.
-->
<Host name = "localhost" appBase = "webapps"
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<! -- SingleSignOn valve, share authentication between web applications
Documentation at:/docs/config/valve.html -->
<! --
<Valve className = "org. apache. catalina. authenticator. SingleSignOn"/>
-->
<! -- Access log processes all example.
Documentation at:/docs/config/valve.html -->
<! --
<Valve className = "org. apache. catalina. valves. AccessLogValve" directory = "logs"
Prefix = "localhost_access_log." suffix = ". txt" pattern = "common" resolveHosts = "false"/>
-->
</Host>
</Engine>
From: http://hi.baidu.com/dd_taiyangxue/blog/item/f6b205df379bf854ccbf1a86.html