tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: mod_jk file not found
Date Sun, 16 May 2010 22:49:36 GMT
Markus Mehrwald wrote:
>> ...
>> By default JkMount entries are not inherited from the global server to
>> other VirtualHosts or between VirtualHosts. For the complete inheritance
>> rules, see: JkMountCopy.
> But why does it work with the VirtualHost for port 80?
It should not. But I don't know the details of how you have defined your 
"main" host and your <VirtualHost> sections.

JkMount/JkUnMount are not supposed to be copied from the "main" section 
into the <VirtualHost> sections, unless :

either :
a) The "main" host config contains a directive
JkMountCopy All

b) The <VirtualHost> config(s) contain(s) a directive
JkMountCopy On

(a) above is supposed to copy them to *all* <VirtualHost> sections.
But maybe there is a subtle condition which causes this not to work if 
you have configured the main section to Listen on two ports ?
Using a name-based <VirtualHost> for HTTPS (if that is what you are 
doing) is a kludge anyway.  It only works because there is only one VH 
defined for that port, and Apache defaults to it when it cannot match 
the name.  Maybe that kludhe somehow interferes with the Jk mounts copy 
mechanism. (I don't know, I haven't tried.)

(b) allows you to be selective about which VH inherits the mounts and 
which not.

Anyway, try to use
JkMountCopy On
in each of the VirtualHost sections (and no JkMountCopy line in the main 
configuration). That should always work.

Apart from that, and to figure out what is being sent by what and/or 
where you are getting the 404 from, I suggest that you install a plugin 
in your browser which allows you to examine the sequence of 
request/responses that really happen.
(Firefox : HttpFox or LiveHttpHeaders; IE : Fiddler2)
An application may be returning a redirect response to the browser, with 
a bad URL, and it may be when the browser tries to get to that 
"replacement" URL that it gets the 404.

(**) Actually, it is more subtle.
JkMountCopy "exists", by default, in all VH, with a default value of "Off".
By setting "JkMountCopy On" in a VH, you make it copy the Jk mounts from 
the main config.
By setting "JkMountCopy All" in the main host, you change the default of 
JkMountCopy in the VH's, from "Off" to "On".
You can still then set "JkMountCopy Off" in one VH, to disable the copy 
for that VH.

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

View raw message