Hi Sutanay,

if you want to use mod_jk to connect httpd to Tomcat, there's a nice way of mapping naming conventions to workers:

- mod_jk can read the name of the configured backend (Tomcat), called a worker in mod_jk, from an httpd environmnt variable. By default it is the env var JK_WORKER_NAME.

- httpd can set env vars with mod_setenvif and mod_rewrite, using regexps on the URI etc.

For an example, see

http://tomcat.apache.org/connectors-doc/reference/apache.html

and search for JK_WORKER_NAME.

I didn't try, but it is quite possible, that you can use something like

<Location /~>
SetHandler jakarta-servlet
SetEnvIf REQUEST_URI ^/~([^/]*) JK_WORKER_NAME=$1
</Location>

to forward any requests to ~myname/x/y/z to a tomcat worker named "myname" (for all different myness with just one config).

Now this will send the request for /~myname/x/y/z to Tomcat, not simply /x/y/z. In order to achieve this you'll need to also rewrite the URL with mod_rewrite before forwarding. mod_rewrite can also set the env var for you.

That's just the rough plot. It'll need a little experimentation :)

Regards,

Rainer

Choudhury, Sutanay schrieb:
I'm trying to configure a system (Solaris/Linux) so individual
developers run their own tomcat instances by setting the CATALINA_BASE
to their individual directories. They would be using different ports for
starting their tomcat instance, and we could preassign that. I would
like to configure the Apache web server (version 2.0) so that a request
as /~<USER_NAME>/webapps/<USER_WEBAPP_NAME> gets forwarded to the
appropriate tomcat instance. I would appreciate if one can give me some
pointers on how to do this.

Thanks,

--Sutanay

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to