We do this using apache's rewrite module. in httpd.conf:
<IfModule !mod_rewrite.c>
LoadModule rewrite_module modules/mod_rewrite.so
</IfModule>
<VirtualHost *>
ServerName a.mycom.com
RewriteEngine On
RewriteRule ^/$ "/a" [R,L]
</VirtualHost>
from there, mod_jk takes over and maps the a.mycom.com/a to
a.mycom.com:8080/a, which should get you want you want.
I'm assuming you're familiar with apache to tomcat connecting via mod_jk.
----- Original Message -----
From: "Wouter de Vaal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 16, 2004 7:39 AM
Subject: context/domain mapping issues
Hi,
I was wondering if the following scenario is possible and how it should
be accomplished, or maybe how I should handle it differently.
I'm using tomcat 5.0.19 and I'm also using apache webserver 2.0.49
I've got in my webapps directory two applications A and B and I have two
domains registered a.mycom.com and b.mycom.com.
What I would like to happen is that request are routed by apache webserver
accordingly,
like this:
http://a.mycom.com -> http://localhost:8080/a
http://b.mycom.com -> http://localhost:8080/b
I have tried the proxy settings describe in the manual pages, but that
way I can only get it working by using
http://a.mycom.com/a -> http://localhost:8080/a
But then again, I guess there would be problems with generated links to the
server (which include the context path).
Any thoughts on this, best practices?
Regards,
Wouter de Vaal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]