You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thomas Rohde <tr...@ordix.de> on 2012/01/29 12:00:16 UTC
Re: Tomcat 6 - How to make an application available at
www.mydomain.com
> André Warnier wrote:
>> 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.
>
> Ooops, he did...
Yes. ;-)
>
>> 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.
That is a good point. I will change my configuration to
JkMount /myApplication/* tomcat
Thank you!
>>
>> 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
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 - How to make an application available at
www.mydomain.com
Posted by Thomas Rohde <tr...@ordix.de>.
> Thomas Rohde wrote:
>>
>> That is a good point. I will change my configuration to
>>
>> JkMount /myApplication/* tomcat
>>
> Actually, you need 2 lines to cover all :
>
> > JkMount /myApplication tomcat # for the index ?
> > JkMount /myApplication/* tomcat # for the rest
Yes, I've already figured that out.
>
> Or you can use the following syntax :
>
> <Location /myApplication>
> SetHandler jakarta-servlet
> ...
> </Location>
That was actually new for me. I'll try it next time. Thank you!
>
> I personally like this second form better : it fits better with the
> general Apache httpd
> configuration style, and it allows for other httpd-level things in the
> same section.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 - How to make an application available at
www.mydomain.com
Posted by André Warnier <aw...@ice-sa.com>.
Thomas Rohde wrote:
>
> That is a good point. I will change my configuration to
>
> JkMount /myApplication/* tomcat
>
Actually, you need 2 lines to cover all :
> JkMount /myApplication tomcat # for the index ?
> JkMount /myApplication/* tomcat # for the rest
Or you can use the following syntax :
<Location /myApplication>
SetHandler jakarta-servlet
...
</Location>
I personally like this second form better : it fits better with the general Apache httpd
configuration style, and it allows for other httpd-level things in the same section.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org