I know that this question has been discussed before, and I searhed through the archives, but was not able to find the answer. What I am trying to accomplish seems like a fairly trivial matter. I want to connect Apache 1.3 with Tomcat 4.1.27 via mod_jk (1.2.5) so that the static content inside the web application would be served by Apache. In addition, I would like to give application users the ability to type the application URL without the need to specify the entry JSP page, i.e. to have the ability to say http://www.hostname.com/app and be automatically forwarded to http://www.hostname.com/app/index.jsp This sound simple enough, but I've been banging my head against the wall trying to accomplish this. Here's the relevant portion of Apache configuration file that I currently have:
... DirectoryIndex index.html index.htm index.jsp
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories JkMount /app/*.jsp worker_new JkAutoAlias /local/tomcat/webapps ...
I tried different combinations and permutations of different options, and even played with the order of AddModule statements, without success. After I enabled mod_jk's debug logging, I get the following information in mod_jk.log file:
[Fri Oct 31 00:03:41 2003] [jk_uri_worker_map.c (500)]: Attempting to map URI '/app' [Fri Oct 31 00:03:41 2003] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [Fri Oct 31 00:03:41 2003] [mod_jk.c (1848)]: mod_jk::jk_translate, check alias_dir: /usr/local/tomcat/webapps [Fri Oct 31 00:03:41 2003] [mod_jk.c (1897)]: mod_jk::jk_translate, AutoAlias OK for file: /usr/local/tomcat/webapps/app [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (500)]: Attempting to map URI '/app/' [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [Fri Oct 31 00:03:42 2003] [mod_jk.c (1848)]: mod_jk::jk_translate, check alias_dir: /usr/local/tomcat/webapps [Fri Oct 31 00:03:42 2003] [mod_jk.c (1871)]: mod_jk::jk_translate, AutoAlias child_dir: [Fri Oct 31 00:03:42 2003] [mod_jk.c (1897)]: mod_jk::jk_translate, AutoAlias OK for file: /usr/local/tomcat/webapps/app/ [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (500)]: Attempting to map URI '/app/index.htm' [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [Fri Oct 31 00:03:42 2003] [mod_jk.c (1848)]: mod_jk::jk_translate, check alias_dir: /usr/local/tomcat/webapps [Fri Oct 31 00:03:42 2003] [mod_jk.c (1871)]: mod_jk::jk_translate, AutoAlias child_dir: index.htm [Fri Oct 31 00:03:42 2003] [mod_jk.c (1897)]: mod_jk::jk_translate, AutoAlias OK for file: /usr/local/tomcat/webapps/app/index.htm [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (500)]: Attempting to map URI '/app/index.html' [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [Fri Oct 31 00:03:42 2003] [mod_jk.c (1848)]: mod_jk::jk_translate, check alias_dir: /usr/local/tomcat/webapps [Fri Oct 31 00:03:42 2003] [mod_jk.c (1871)]: mod_jk::jk_translate, AutoAlias child_dir: index.html [Fri Oct 31 00:03:42 2003] [mod_jk.c (1897)]: mod_jk::jk_translate, AutoAlias OK for file: /usr/local/tomcat/webapps/app/index.html [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (500)]: Attempting to map URI '/app/index.jsp' [Fri Oct 31 00:03:42 2003] [jk_uri_worker_map.c (580)]: jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match worker_new -> *.jsp
The last line seems to imply that the right match was found, but
I get 404 File Not Found regardless. If I type the exact URL however,
as in http://www.hostname.com/app/index.jsp - everything works
without any problems. Any ideas on how to get this to work?
Also, looking at the log file, it appears that mod_jk attempts to match pretty much any URL that comes through Apache. Is that normal, or is this a result of some other
misconfiguration on my part? Thanks in advance for
any ideas - I truly hope that I am overlooking something simple here ;)
Regards, -M-
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
