CCL Home Page
Up Directory CCL node14.html
Virtual Hosts next up previous contents
Next: About this document ... Up: Installing Jakarta-Tomcat with Apache Previous: Using j2sdk1.3   Contents

Virtual Hosts

Tomcat is capable of working with Apache's virtual hosting. Just like when you add a context, you must modify server.xml, but this time you put the Context within <Host> </Host> tags, such as in this example:

<Host name="some.domain.com" >

<Context path=""

 docBase="webapps/examples" />

<Context path="/examples"

 docBase="webapps/ROOT" />

</Host>
As you can see, other than the <Host> </Host> tags, it's similar to adding an ordinary Context entry.

Now in /etc/apache/httpd.conf you must configure the Apache side of things. Inside of the <VirtualHost> </VirtualHost> section you must place the Apache directives that normally would have gone in /etc/apache/mod_jk/tomcat.conf or tomcat-auto. An example of this is given in Section [*].


2001-05-26
Modified: Sun May 27 22:08:41 2001 GMT
Page accessed 4513 times since Mon Feb 3 15:24:35 2003 GMT