You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Larry Isaacs <La...@sas.com> on 2002/02/01 13:51:10 UTC

RE: Getting Tomcat to generate DocumentRoot in mod_jk.conf

The default in Tomcat 3.3's generated mod_jk.conf is to not
attempt to override Apache's "htdocs" with Tomcat's "ROOT".
Usually this requires a little manual intervention before it
will work successfully.  First, a choice must be made as to
who will be the "ROOT" context, Apache's "htdocs" or Tomcat's
"ROOT".

In your case, it looks like you want to use Tomcat's "ROOT".
To do this, add:

    noRoot="false"

to the <ApacheConfig ... /> entry in server.xml and then regenerate
conf/auto/mod_jk.conf using the "jkconf" startup option.  Another
default is to forward all context requests to Tomcat.  This allows
any behavior defined in the web.xml to function properly.  However,
if you prefer Apache to serve static content, also add:

    forwardAll="false"

to the <ApacheConfig ... /> entry and regenerate mod_jk.conf.
Assuming you aren't using virtual hosts, you will also need to
manually change the DocumentRoot directive in Apache's httpd.conf
to point to Tomcat's "ROOT" webapp directory.  The mod_jk.conf isn't
able to override this setting.

Cheers,
Larry 

> -----Original Message-----
> From: Joe Emenaker [mailto:joe@emenaker.com]
> Sent: Thursday, January 31, 2002 5:06 PM
> To: Tomcat Users List
> Subject: Getting Tomcat to generate DocumentRoot in mod_jk.conf
> 
> 
> I originally posted this in a thread that was pretty much 
> dead... so I think
> it got ignored. Here it is again with a more appropriate subject line.
> 
> When I make a webapp in Tomcat 3.3 and define a ROOT context, 
> it doesn't put
> any DocumentRoot statement in the auto-generated mod_jk.conf.
> 
> Basically, I'm trying to be able to do all configuration for 
> a virtual host
> with an AutoWebApp entry in Tomcat's server.xml. I want 
> everything Apache
> needs (DocumentRoot, JkMounts, the "deny" entries for WEB-INF....
> everything) to be autogenerated by Tomcat.
> 
> Does anyone know of a way to make it do this?
> 
> - Joe
> 
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>