Tags

links:

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
https://support.eapps.com/index.php?/Knowledgebase/Article/View/411/52/user-guide—tomcat-7-installation-and-tuning#how_tomcat_handles_requests

summary:
– “host” and “context”
– “NOT recommended to place elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.”
– by default a localhost created
– upon request, matching host, then matching alias
– then, matching context inside the host
– “The Context will define what application to serve for a given path by defining a docBase for that path”
e.g. host block:

<Host appBase="/home/webadmin/eapps-example.com" name="eapps-example.com" autoDeploy="true">
<Alias>www.eapps-example.com</Alias>
<Context path="" docBase="html" debug="0" reloadable="true"/>
<!-- Manager application context below -->
<Context path="/manager" docBase="/opt/tomcat7/webapps/manager" privileged="true" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="eapps-example.com._manager" suffix=".txt" timestamp="true"/>
</Context>
</Host>
Advertisements