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 Johnson <pe...@thejohnsons.com.au> on 2004/03/23 22:41:23 UTC

JK2 Connections from Apache2 URL Rewriting

I have been reading through
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/ and other sources
via google trying to work out the best way of mapping live URLs to
specific webapps. e.g.

Map www.mydomain.com/myshortcut -> www.domain.com/mywebapp/subpath/url

My environment is Apache2 mod_jk2 and Tomcat 5.

So far I have implemented it using mod_proxy in apache as
RewriteRule ^/myshortcut(.*)
http://www.domain.com/mywebapp/subpath/url$1 [P]

However I don't feel that this a clean solution. Does Tomcat5 or JK2
support some form of URI mapping / aliasing? e.g. Resin has an alias
directive.

Thanks in advance,
Peter


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


RE: JK2 Connections from Apache2 URL Rewriting

Posted by Peter Johnson <pe...@thejohnsons.com.au>.
Thanks for the reply but they are referring to a Host Name Alias not a
URI alias. i.e. www.company.com == company.com (to steal their example)
I require /bar == /foo/bar.
I don't believe that mod_alias will work because it operates in a
similar fashion to symlinks in *nix. It creates a virtual path to
something outside the standard directory structure.

-PJ

On Wed, 2004-03-24 at 10:19, Yansheng Lin wrote:
> Hey, Tomcat does support alias! take a look at the Host element:).
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
> 
> Can you use apache mod_alias directive instead of the mod_proxy directive? 
> 
> -Yan
> 
> -----Original Message-----
> From: Peter Johnson [mailto:peter@thejohnsons.com.au] 
> Sent: Tuesday, March 23, 2004 2:41 PM
> To: tomcat-user@jakarta.apache.org
> Subject: JK2 Connections from Apache2 URL Rewriting
> 
> 
> 
> I have been reading through
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/ and other sources
> via google trying to work out the best way of mapping live URLs to
> specific webapps. e.g.
> 
> Map www.mydomain.com/myshortcut -> www.domain.com/mywebapp/subpath/url
> 
> My environment is Apache2 mod_jk2 and Tomcat 5.
> 
> So far I have implemented it using mod_proxy in apache as
> RewriteRule ^/myshortcut(.*)
> http://www.domain.com/mywebapp/subpath/url$1 [P]
> 
> However I don't feel that this a clean solution. Does Tomcat5 or JK2
> support some form of URI mapping / aliasing? e.g. Resin has an alias
> directive.
> 
> Thanks in advance,
> Peter
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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


RE: JK2 Connections from Apache2 URL Rewriting

Posted by Yansheng Lin <ya...@silvacom.com>.
Hey, Tomcat does support alias! take a look at the Host element:).
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html

Can you use apache mod_alias directive instead of the mod_proxy directive? 

-Yan

-----Original Message-----
From: Peter Johnson [mailto:peter@thejohnsons.com.au] 
Sent: Tuesday, March 23, 2004 2:41 PM
To: tomcat-user@jakarta.apache.org
Subject: JK2 Connections from Apache2 URL Rewriting



I have been reading through
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/ and other sources
via google trying to work out the best way of mapping live URLs to
specific webapps. e.g.

Map www.mydomain.com/myshortcut -> www.domain.com/mywebapp/subpath/url

My environment is Apache2 mod_jk2 and Tomcat 5.

So far I have implemented it using mod_proxy in apache as
RewriteRule ^/myshortcut(.*)
http://www.domain.com/mywebapp/subpath/url$1 [P]

However I don't feel that this a clean solution. Does Tomcat5 or JK2
support some form of URI mapping / aliasing? e.g. Resin has an alias
directive.

Thanks in advance,
Peter


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


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