1
votes

I have setup apache and tomcat6 and forward all requests to tomcat with mod_jk.

I want all url for a specific virtualhost to be forwarded to tomcat except for the webmail folder that should be handled by apache.

Currently I am using the JkMount /* worker1 directive in the httpd.conf

Please suggest how I could accomplish this.

1

1 Answers

1
votes

With many trials & errors, I finaly got it to work.

For anyone interested here is what I have done in the httpd.conf file

JkOptions  +ForwardURICompatUnparsed
JkMount /* worker1
JkUnmount /webmail/* worker1
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.mydomain.com
RewriteRule ^(.*) http://www.mydomain.com/webmail/ [R]