From d99e002655481692f64e8f49ebe49748195a865a Mon Sep 17 00:00:00 2001
From: markt
Date: Mon, 1 Jan 2007 19:42:37 +0000
Subject: [PATCH] Add virtual hosting howto to TC6 docs (copied from TC5)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@491620 13f79535-47bb-0310-9956-ffa450edef68
---
webapps/docs/changelog.xml | 7 +++
webapps/docs/index.xml | 11 +++-
webapps/docs/project.xml | 5 +-
webapps/docs/virtual-hosting-howto.xml | 107 +++++++++++++++++++++++++++++++++
4 files changed, 127 insertions(+), 3 deletions(-)
create mode 100644 webapps/docs/virtual-hosting-howto.xml
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d3b300b06..9194326ee 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -34,6 +34,13 @@
+
+
+
+ Add a virtual hosting how-to contributed by Hassan Schroeder. (markt)
+
+
+
diff --git a/webapps/docs/index.xml b/webapps/docs/index.xml
index 85ce1c5e7..8e3b97f47 100644
--- a/webapps/docs/index.xml
+++ b/webapps/docs/index.xml
@@ -100,7 +100,16 @@ Apache Tomcat 6, and using many of the Apache Tomcat features.
Monitoring and Management -
Enabling JMX Remote support, and using tools to monitor and manage Apache Tomcat.
Logging -
- Confuguring logging in Apache Tomcat.
+ Configuring logging in Apache Tomcat.
+Apache Portable Runtime -
+ Using APR to provide superior performance, scalability and better
+ integration with native server technologies.
+Virtual Hosting -
+ Configuring vitual hosting in Apache Tomcat.
+Advanced IO -
+ Extensions available over regular, blocking IO.
+Additional Components -
+ Obtaining additional, optional components.
diff --git a/webapps/docs/project.xml b/webapps/docs/project.xml
index 1ee08378b..4dff7f5c8 100644
--- a/webapps/docs/project.xml
+++ b/webapps/docs/project.xml
@@ -44,8 +44,9 @@
href="monitoring.html"/>
-
-
+
+
diff --git a/webapps/docs/virtual-hosting-howto.xml b/webapps/docs/virtual-hosting-howto.xml
new file mode 100644
index 000000000..84f3e730f
--- /dev/null
+++ b/webapps/docs/virtual-hosting-howto.xml
@@ -0,0 +1,107 @@
+
+
+]>
+
+
+ &project;
+
+
+ Virtual Hosting and Tomcat
+
+
+
+
+
+
+ For the sake of this how-to, assume you have a development host with two
+ host names, ren and stimpy. Let's also assume
+ one instance of Tomcat running, so $CATALINA_HOME refers to
+ wherever it's installed, perhaps /usr/local/tomcat.
+
+
+ Also, this how-to uses Unix-style path separators and commands; if you're
+ on Windows modify accordingly.
+
+
+
+
+
+ At the simplest, edit the Engine portion
+ of your server.xml file to look like this:
+
+
+<Engine name="Catalina" defaultHost="ren">
+ <Host name="ren" appBase="webapps/ren"/>
+ <Host name="stimpy" appBase="webapps/stimpy"/>
+</Engine>
+
+
+ Consult the configuration documentation for other attributes of the
+ Engine and
+ Host elements.
+
+
+
+
+
+ Create directories for each of the virtual hosts:
+
+
+mkdir $CATALINA_HOME/webapps/ren
+mkdir $CATALINA_HOME/webapps/stimpy
+
+
+
+
+
+
+ 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
+ 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.:
+
+
+mkdir $CATALINA_HOME/conf/Catalina/ren
+mkdir $CATALINA_HOME/conf/Catalina/stimpy
+
+
+ Note that the ending directory name "Catalina" represents the
+ name attribute of the
+ Engine element as shown above.
+
+
+ Now, for your default webapps, add:
+
+
+$CATALINA_HOME/conf/Catalina/ren/ROOT.xml
+$CATALINA_HOME/conf/Catalina/stimpy/ROOT.xml
+
+
+ If you want to use the Tomcat manager webapp for each host, you'll also
+ need to add it here:
+
+
+cd $CATALINA_HOME/conf/Catalina
+cp localhost/manager.xml ren/
+cp localhost/manager.xml stimpy/
+
+
+
+
+ Consult the configuration documentation for other attributes of the
+ Context element.
+
+
+
+
+
+
--
2.11.0