Hi,

I want to find out how to correctly fix BZ 41430 and 36121. They have to do with the way mod_dir and mod_jk interact. Before fixing the code I find it necessary to define the correct behaviour, which seems to be non-trivial.

The behaviour needs to be described depending on DirectoryIndex and "JkOptions ForwardDirectories".

I try to answer via two general rules, that I suggest:

A) The first entry in DirectoryIndex that exists either locally or matches a JkMount stops the procedure. If it exists locally it gets served by Apache, if it matches a JkMount and does not exist locally it gets forwarded to Tomcat.

B) If no entry in DirectoryIndex exists locally or matches a JkMount, the Option ForwardDirectories decides: Off=Apache, On=Tomcat. The forwarded request is the original request without any DirectoryIndex files.

I haven't checked, if this can be implemented easily. I first want to know, if this seems like a reasonable behaviour?

The downside is: If you have "JkMount /*.jsp w" and "DirectoryIndex index.jsp", Apache will send all dirs with index.jsp to Tomcat.

Here are some cases:

Assume we have DirectoryIndex file1 file2 and we process a request /test/ which points to /path/test/.

1) Non of the files /path/test/file1 and /path/test/file2 exist, non of them matches any JkMount.

a) ForwardDirectories is not set: Apache tries to serve the directory /path/test/

b) ForwardDirectories is set: We forward the original request to Tomcat (/test/) without file1 or file2.

2) Non of the files /path/test/file1 and /path/test/file2 exist, but one of them (assume file1) matches a JkMount.

We forward /test/file1.

3) At least one of the files exists (assume file2), non of them matches any JkMount.

a) ForwardDirectories is not set: Apache tries to serve /path/test/file2

b) ForwardDirectories is set: Again Apache tries to serve /path/test/file2.

4) At least one of the files exists (assume file2), and file1 matches a JkMount.

Apache serves /path/test/file2, or forward /test/file1, whichever comes first in the DirectoryIndex list.

5) The same file file1 that exists, also matches a JkMount.

Apache serves locally /path/test/file1.

Thanks

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to