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 DC2759019 for ; Wed, 13 Jun 2012 03:58:56 +0000 (UTC) Received: (qmail 11627 invoked by uid 500); 13 Jun 2012 03:58:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 11576 invoked by uid 500); 13 Jun 2012 03:58:53 -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 11561 invoked by uid 99); 13 Jun 2012 03:58:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2012 03:58:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of moonblade.wolf@gmail.com designates 209.85.214.173 as permitted sender) Received: from [209.85.214.173] (HELO mail-ob0-f173.google.com) (209.85.214.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2012 03:58:47 +0000 Received: by obbwd20 with SMTP id wd20so297467obb.18 for ; Tue, 12 Jun 2012 20:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=wXYfLHk2Jry68dtSTusvOvDf5MaX5GRvuUYD2cg58aM=; b=HeC+7ukZtiJJtoAdeak3lxbdxXX/eyEqqMFgirv+95T3BsCRkmisoO0wOg8G4vLPcq VUwJPl60sq0BDURmZPSUrkSuYEr/5WPaX8ustYbRwdp8dk1dH22ECoBf+FOBVMmhtilD 5gVtQID4eP6a7JC/mxIanVUbX/+Loa/EbTxcEiJXEC/BJUSFxBHhhEGALKgUmRVJJaV6 hY6Ohy7MgWAxo9VgFayrME68C6wxSqhXXl0Apem1CPapRvd0rKqjdCGPrUF4qFVTs5Si bBjo1wMaiccVIsfEhv52Go2zhdRPnKxP6qRLnYvc9sGMpTk8oCn7OYeYAI5EeGDZNP// JdYg== MIME-Version: 1.0 Received: by 10.60.170.203 with SMTP id ao11mr22962768oec.25.1339559906196; Tue, 12 Jun 2012 20:58:26 -0700 (PDT) Received: by 10.76.18.72 with HTTP; Tue, 12 Jun 2012 20:58:26 -0700 (PDT) In-Reply-To: <4FD798A7.9060004@ice-sa.com> References: <4FD798A7.9060004@ice-sa.com> Date: Wed, 13 Jun 2012 10:58:26 +0700 Message-ID: Subject: Re: Map domain names to different paths of a single webapp ? From: Albert Kam To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have checked the tuckey urlRewriter, and it seems cool, but doesnt seem to fit my needs. Anyway, you warnings make a lot of sense to me, so thanks there ! On Wed, Jun 13, 2012 at 2:29 AM, Andr=E9 Warnier wrote: > Albert Kam wrote: >> >> Dear Tomcat Users ! >> >> Let's say that i have this simple webapp using Tomcat 7, and let's say >> the context name is "albertzoo" >> http://albertzoo.com > > > "albertzoo" is not the context here, it's a . > If you want that application to respond to the URL "http://albertzoo.com/= " > (thus the context "/"), you will have to use the ROOT webapp. > > >> >> And then, i would like a niche site for monkeys with it's own domain : >> http://albertzoomonkeys.com > > > "albertzoomonkeys.com" is the host. The context is "/". > > >> which is actually the same as : >> http://albertzoo.com/monkeys > > > In this one (barring tricks), "monkeys" is the context. > > >> >> But if the user is accessing through albertzoomonkeys.com, i dont want >> them to see the albertzoo.com/monkeys in their browser > > > unless you do an external redirect, they should not see that. > > >> >> Is it possible to do with a single webapp context, or do i have to >> have different contexts(virtual hosts) for these different domains ? >> > > I think that technically, you could monkey around to achieve that. =A0But= it > is probably a lot more trouble than it's worth (risks of double deploymen= t, > a mess when you undeploy or want to manage your apps etc..). > > Probably much better to use two separate , each with its own appBas= e > (/webapps) directory; > in one of them, you deploy your application as the ROOT (default) > application (see the FAQ for that); in the other, you deploy *a copy* of = the > same application as "monkeys" (and, supposedly, some other "animals" > application as ROOT). > The only inconvenient is that when you update the monkeys application, > you'll have to copy it to both places. =A0But that will be much easier to > manage, than to try some clever overlapping scheme which is going to come > back and hit you somewhere.. > > Alternatively, if you feel adventurous, you could try a single wit= h > an Alias, and play with the URLrewrite filter (see www.tuckey.org) and > internal redirects, but... you have been warned. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --=20 Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org