hgomez 2004/07/14 05:46:23
Modified: jk/native/apache-2.0 mod_jk.c
Log:
Make use of note, no-jk (a la mod_deflate), to exclude some URL from
being relayed to tomcat even if URL match a JkMount directive.
For instance you could use :
<VirtualHost *:80>
ServerName testxxx.mysys
DocumentRoot /www/testxxx/htdocs
SetEnvIf Request_URI "/home/*" no-jk
Alias /home /home/dataxxx/
<Directory "/home/dataxxx">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
JkMount /* myssys-xxx
</VirtualHost>
With such all requests will be relayed to tomcat worker myssys-xxx
execpt the one containing /home.
Revision Changes Path
1.95 +22 -1 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
Index: mod_jk.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- mod_jk.c 10 Mar 2004 12:13:31 -0000 1.94
+++ mod_jk.c 14 Jul 2004 12:46:23 -0000 1.95
@@ -1643,6 +1643,12 @@
xconf = (jk_server_conf_t *)ap_get_module_config(r->server->module_config,
&jk_module);
+ if (apr_table_get(r->subprocess_env, "no-jk")) {
+ jk_log(xconf->log, JK_LOG_DEBUG, "Into handler no-jk env var detected for
uri=%s, declined\n",
+ r->uri);
+
+ return DECLINED;
+ }
/* Was the option to forward directories to Tomcat set? */
if(!dmt && !(xconf->options & JK_OPT_FWDDIRS))
@@ -2245,6 +2251,13 @@
return DECLINED;
}
+ if (apr_table_get(r->subprocess_env, "no-jk")) {
+ jk_log(conf->log, JK_LOG_DEBUG, "Into translate no-jk env var
detected for uri=%s, declined\n",
+ r->uri);
+
+ return DECLINED;
+ }
+
/* Special case to make sure that apache can serve a directory
listing if there are no matches for the DirectoryIndex and
Tomcat webapps are mapped into apache using JkAutoAlias. */
@@ -2393,6 +2406,14 @@
"Manually mapped, no need to call uri_to_worker\n");
return DECLINED;
}
+
+ if (apr_table_get(r->subprocess_env, "no-jk")) {
+ jk_log(conf->log, JK_LOG_DEBUG, "Into map_to_storage no-jk env var
detected for uri=%s, declined\n",
+ r->uri);
+
+ return DECLINED;
+ }
+
uri = apr_pstrdup(r->pool, r->uri);
worker = map_uri_to_worker(conf->uw_map, uri, conf->log);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]