tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat 6 - How to make an application available at www.mydomain.com
Date Sun, 29 Jan 2012 10:49:36 GMT
Thomas Rohde wrote:
>> I'm running tomcat 6 behind apache.
>>
>> I currently have an application deployed as "myApplication" and it is
>> available at "http://www.mydomain.com/myApplication".
>>
>> How can I make this application available at "http://www.mydomain.com"
>> without deploying it as ROOT.war?
>>
>> My server is running Ubuntu 10.04.
>>
>> Thanks!
>>
>> Dean Del Ponte
>>
> 
> You could use a rewrite rule to achieve that:
> 
> RewriteEngine On
> RewriteRule ^/$ /myApplication/ [PT]
> JkMount /myApplication* tomcat
> 
> Works for me very well.
> 

That is assuming that the OP has an Apache httpd front-end, which he never said.
Also, even if he has, the above is not enough except in the simplest of cases.
As far as I can tell also, this RewriteRule only rewrites requests to "/".
If that is enough to make it work for you, then one could wonder why you need an httpd 
front-end in the first place.
Note also that the JkMount above will not only proxy "/myApplication" and 
"/myApplication/*", but just as well "/myApplication_as_a_prefix" and anything else 
starting with "myApplication".  This may or may not be what you want, in terms of security

for example.

Chuck's recommendation is still the best.
The above notes already illustrate some of the reasons.
Let's see if the OP really has a good reason /not to/ deploy his application as ROOT.


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


Mime
View raw message