On 06.10.2009 06:56, gpike wrote:
> 
> I have Virtual Hosts defined in Apache for each domain. I want to map the
> domain to a context in Tomcat. For instance I would like mysite.com to map
> to /mysite_com in Tomcat. Would it be something like: 
> 
> <VirtualHost *:80>
>         ServerName mysite.com
>         RewriteRule ^/(.*)$ /mysite_com/$1 [PT]
>         JkMount /mysite_com/* worker1
> </VirtualHost>
> 
> Is there a better way?
> 
> Thanks Gordon

If you already have contexts like mysite_com and you have reasons for
adding httpd and mod_jk, then yes, that would be the way to go.

The RewriteRule is a bit underspecified though, it would also apply to
URLs, which already start with /mysite_com/. You can use RewriteCond
with a "!" to check against not starting with /mysite_com/.

You miht run into trouble with cookies and redirects. Have a look at

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL
Rewriting

concerning more info about those.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to