You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Choe <ch...@mindspring.com> on 2003/04/15 15:31:24 UTC

mod_jk redirection

I have an apache webserver connecting to a Tomcat Application Server 
(different machines).  I am using mod_jk to redirect some directories 
from apache to tomcat.

currently each web application has its own directory under the webapps 
folder, and i have the mod_jk.conf file like:

<IfModule mod_jk.c>

JkWorkersFile /usr/local/tomcat/conf/workers.properties
#JkLogFile  logs/jk.log
#JkLogLevel warning

JkMount /application/* ajp13
JkMount /application ajp13

JkMount /courses/* ajp13
JkMount /courses ajp13

JkMount /deptauth/* ajp13
JkMount /deptauth ajp13

JkMount /directory/* ajp13
JkMount /directory ajp13

JkMount /email/* ajp13
JkMount /email ajp13
</IfModule>

so, if a request is made to http://myserver.com/directory it will send 
the request to the tomcat server.

the questions is, i want to setup a separate directory for all my web 
applications so that i can do something like:

http://myserver.com/app/directory

is there a way to do this (map app/directory to webapps/directory on 
tomcat)?  how would you config the mod_jk.conf file to do this?

Peter Choe



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: mod_jk redirection

Posted by Bill Barker <wb...@wilshire.com>.
I would generally use mod_rewrite for something like this.  e.g.:

# if I care about the Context name
RewriteRule ^/app/.* $1 [R]
# otherwise
RewriteRule ^/app/.* $1 [PT]

"Peter Choe" <ch...@mindspring.com> wrote in message
news:3E9C09AC.5090700@mindspring.com...
> I have an apache webserver connecting to a Tomcat Application Server
> (different machines).  I am using mod_jk to redirect some directories
> from apache to tomcat.
>
> currently each web application has its own directory under the webapps
> folder, and i have the mod_jk.conf file like:
>
> <IfModule mod_jk.c>
>
> JkWorkersFile /usr/local/tomcat/conf/workers.properties
> #JkLogFile  logs/jk.log
> #JkLogLevel warning
>
> JkMount /application/* ajp13
> JkMount /application ajp13
>
> JkMount /courses/* ajp13
> JkMount /courses ajp13
>
> JkMount /deptauth/* ajp13
> JkMount /deptauth ajp13
>
> JkMount /directory/* ajp13
> JkMount /directory ajp13
>
> JkMount /email/* ajp13
> JkMount /email ajp13
> </IfModule>
>
> so, if a request is made to http://myserver.com/directory it will send
> the request to the tomcat server.
>
> the questions is, i want to setup a separate directory for all my web
> applications so that i can do something like:
>
> http://myserver.com/app/directory
>
> is there a way to do this (map app/directory to webapps/directory on
> tomcat)?  how would you config the mod_jk.conf file to do this?
>
> Peter Choe




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org