Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 41683919C for ; Sun, 29 Jan 2012 10:50:16 +0000 (UTC) Received: (qmail 6876 invoked by uid 500); 29 Jan 2012 10:50:12 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 6675 invoked by uid 500); 29 Jan 2012 10:50:11 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 6666 invoked by uid 99); 29 Jan 2012 10:50:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jan 2012 10:50:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jan 2012 10:50:03 +0000 Received: from [192.168.245.129] (p549E029F.dip0.t-ipconnect.de [84.158.2.159]) by tor.combios.es (Postfix) with ESMTPA id 477FBDA0407 for ; Sun, 29 Jan 2012 11:49:41 +0100 (CET) Message-ID: <4F252440.1000005@ice-sa.com> Date: Sun, 29 Jan 2012 11:49:36 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat 6 - How to make an application available at www.mydomain.com References: <38589.192.168.7.86.1327831787.squirrel@emailix.ordix.de> In-Reply-To: <38589.192.168.7.86.1327831787.squirrel@emailix.ordix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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