tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heather Buch" <>
Subject jkmounts screwing up my namevirtualhost
Date Fri, 27 Jun 2003 11:14:54 GMT

My NameVirtualHost fails when I try to set the JkMount directives.

I am using
(I am also using jakarta-struts-1.0.2, but this might not be so relevant to my

Here is my setup (I describe the problem at the end using the specific names
that appear in the config file snippets below):

1. in /etc/hosts:

 # Do not remove the following line, or various programs
# that require network functionality will fail.               localhost.localdomain localhost               oecon-stprg               oecon-admprg             heather

2. In httpd.conf:


Here is my "catch all" localhost virtual host:

ServerAdmin admin@localhost
ServerAlias localhost.localdomain localhost
DocumentRoot "/usr/local/bin/server-1.0/apache2/htdocs"
ServerName localhost
ErrorLog logs/localhost_error.log
CustomLog logs/localhost_access.log common

3. in mod_jk.conf-local 

Here is the virtual host that I am trying to work with:

ServerName oecon-stprg
ServerAlias oecon-stprg

# Deny direct access to WEB-INF and META-INF
<Location "WEB-INF/*">
    AllowOverride None
    deny from all
<Location "META-INF/*">
     AllowOverride None
     deny from all
<Directory "/usr/local/bin/server-1.0/jakarta-tomcat-4.1.12/webapps/oecon-stprg">
    Options Indexes FollowSymLinks
	order	allow,deny
	allow	from all
    DirectoryIndex login.jsp 

JkMount /*.do ajp13
JkMount /servlet/*.jsp ajp13
JkMount /*.jsp ajp13

#ErrorLog logs/oecon-stprg_error.log
#CustomLog logs/oecon-stprg_access.log common


The problem is - when I call up my virtual host url (http://oecon-stprg) and
comment out the JkMount directives, apache gives me the proper document root
("/usr/local/bin/server-1.0/jakarta-tomcat-4.1.12/webapps/oecon-stprg/") but
of course then Tomcat can't handle jsp pages because there are no JkMount
directives. When I uncomment the JkMounts and call up my virtual host, Apache
does not send me to the DocumentRoot that I have defined in my oecon-stprg
VirtualHost, but instead to the default tomcat webapp.

In other words, the presence of this in my VirtualHost block: 

JkMount /*.do ajp13
JkMount /servlet/*.jsp ajp13
JkMount /*.jsp ajp13

causes Apache to deliver the files under here:


intead of the ones under here:


I hope I have explained this well enough to get a reply. I have struggled for
two days now. I read the document at as I generally think
the Galatea guides are very good. However, it describes setting up the
JkMounts under a subdirectory, for example,

JkMount /test ajp13
JkMount /test/* ajp13

and not at the root, as I would like to do. I want to be able to call up




but maybe I need that subdirectory?

Thanks very much in advance,

Heather Buch

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message