From: markt Date: Sat, 8 Sep 2007 19:57:27 +0000 (+0000) Subject: Clarify appBase - docBase relationship X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5ed5f368878d67d9b97b0b3421ea4972a85e68f1;p=tomcat7.0 Clarify appBase - docBase relationship git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@573898 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/docs/virtual-hosting-howto.xml b/webapps/docs/virtual-hosting-howto.xml index 5a9dca37b..d38cdb7d1 100644 --- a/webapps/docs/virtual-hosting-howto.xml +++ b/webapps/docs/virtual-hosting-howto.xml @@ -48,14 +48,18 @@

<Engine name="Catalina" defaultHost="ren"> - <Host name="ren" appBase="webapps/ren"/> - <Host name="stimpy" appBase="webapps/stimpy"/> + <Host name="ren" appBase="webapps-ren"/> + <Host name="stimpy" appBase="webapps-stimpy"/> </Engine>

+ Note that the directory structures under the appBase for each host should + not overlap each other. +

+

Consult the configuration documentation for other attributes of the Engine and - Hostelements. + Host elements.

@@ -64,23 +68,36 @@ Create directories for each of the virtual hosts:

-mkdir $CATALINA_HOME/webapps/ren -mkdir $CATALINA_HOME/webapps/stimpy +mkdir $CATALINA_HOME/webapps-ren +mkdir $CATALINA_HOME/webapps-stimpy
- + +

Contexts are normally located underneath the appBase directory. For + example, to deploy the foobar context as a war file in + the ren host, use + $CATALINA_HOME/webapps-ren/foobar.war. Note that the + default or ROOT context for ren would be deployed as + $CATALINA_HOME/webapps-ren/ROOT.war (WAR) or + $CATALINA_HOME/webapps-ren/ROOR (directory). +

+

NOTE: The docBase for a context should never be + the same as the appBase for a host. +

+
+

Within your Context, create a META-INF directory and then place your Context definition in it in a file named context.xml. i.e. - $CATALINA_HOME/webapps/ren/ROOT/META-INF/context.xml + $CATALINA_HOME/webapps-ren/ROOT/META-INF/context.xml This makes deployment easier, particularly if you're distributing a WAR file.

- +

Create a structure under $CATALINA_HOME/conf/Catalina corresponding to your virtual hosts, e.g.: @@ -118,6 +135,5 @@ cp localhost/manager.xml stimpy/

-