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 9CE10F788 for ; Thu, 4 Apr 2013 20:49:21 +0000 (UTC) Received: (qmail 43702 invoked by uid 500); 4 Apr 2013 20:49:18 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 43627 invoked by uid 500); 4 Apr 2013 20:49:18 -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 43618 invoked by uid 99); 4 Apr 2013 20:49:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 20:49:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of icicimov@gmail.com designates 209.85.219.46 as permitted sender) Received: from [209.85.219.46] (HELO mail-oa0-f46.google.com) (209.85.219.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 20:49:14 +0000 Received: by mail-oa0-f46.google.com with SMTP id k1so3322466oag.33 for ; Thu, 04 Apr 2013 13:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=BQ9aumAOgZMUpQl+7d3rMDvfEyVnwGQdggELOO/5c8U=; b=ezwrqnsZ/60i6+ImqT6MaLffLHFoyKGnU1jYQtd8TGYZ4+M2gmIO8QJHlwI10uSShT LjttWzLk85IhWhXRm1PRYBaihby4m2j7kwZKgao8K+6HwKFg9R9wDQNW5BOuefW/jiuy Pu343cq2lEV106q9ollPq3AftFLVq2ic9iQpUSeQzgN7LKMVsdW9gFVWGWWb6AwbhGn+ CraMdpCXNNZHeIpZhdXkWFsymxbSJ0pjc3jBiEYWyEV3VBh2nYWcj37IqnoXC3p65aWJ 86v14F09rgNphQWTU6YKPVe1p+/dxWvD2c4F5K0ixQv2bz8FdSMsnugLsP0iDF4QvGIx XiVg== MIME-Version: 1.0 X-Received: by 10.182.156.103 with SMTP id wd7mr5709094obb.33.1365108533698; Thu, 04 Apr 2013 13:48:53 -0700 (PDT) Received: by 10.76.91.230 with HTTP; Thu, 4 Apr 2013 13:48:53 -0700 (PDT) Received: by 10.76.91.230 with HTTP; Thu, 4 Apr 2013 13:48:53 -0700 (PDT) In-Reply-To: <2D160494-DF3C-4440-B08C-FCF7024CF41D@electrichendrix.com> References: <1605326641.11126.1365092882908.JavaMail.root@electrichendrix.com> <515DC957.4060900@christopherschultz.net> <2D160494-DF3C-4440-B08C-FCF7024CF41D@electrichendrix.com> Date: Fri, 5 Apr 2013 07:48:53 +1100 Message-ID: Subject: Re: Serve same content to multiple URL's From: Igor Cicimov To: Tomcat Users List Content-Type: multipart/alternative; boundary=f46d0444e8353b29ce04d98f196e X-Virus-Checked: Checked by ClamAV on apache.org --f46d0444e8353b29ce04d98f196e Content-Type: text/plain; charset=ISO-8859-1 On 05/04/2013 7:26 AM, "Chris Arnold" wrote: > > On Apr 4, 2013, at 2:38 PM, "Christopher Schultz" < chris@christopherschultz.net> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > Chris, > > > > On 4/4/13 12:28 PM, Chris Arnold wrote: > >> > >> I have tried to add a second worker (worker2) in workers.properties > >> and added a virtualhost like: Here is the configured virtualhost > >> for domain2: 2nd virtualhost: JkMount /share|/* worker2 > >> RedirectMatch ^/$ http://share.domain2.com/share/ > > > > If you want the content to be identical, why do you need a second worker? > > I didn't think I needed a second worker but because the working config only worked for http://share.domain1.com and nothing else, I wanted to verify it should work or I needed another worker and you verified I do not need another worker and in fact, the existing config for http://share.domain1.com should work for http://share.domain2.com > > > > Why do you need a second VirtualHost, even? > > Apache has to answer for that request (http://share.domain2.com) and pass it to tomcat > > You just need to create Alias in the existing VirtualHost in Apache and the Host in Tomcat. > >> When i type http://share.domain2.com i arrive at 1 of our websites > >> but not the tomcat content. When i type > >> http://share.domain2.com/share i get a 404 error. Do i need to > >> define another worker to accomplish this or should the defined > >> worker work for any domain given there is a virtualhost defined? > > > > Workers don't care about VirtualHosts: the client's request headers > > will be sent to Tomcat and another round of virtual host resolution > > will occur over there. Having separate workers does not help anything. > > > > I'm not sure why you are getting 404s: any idea if it's a response > > coming from httpd or Tomcat? > > No error logs in apache or tomcat which is weird? > > > If you browse to > > http://share.domain2.com/ are you properly redirected (as I would > > expect given the above configuration) to http://share.domain2.com/share? > > It doesn't appear so as a apache site answers the request. --f46d0444e8353b29ce04d98f196e--