Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 24008 invoked from network); 23 Jun 2003 15:25:33 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 23 Jun 2003 15:25:33 -0000 Received: (qmail 4011 invoked by uid 97); 23 Jun 2003 15:27:56 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 4003 invoked from network); 23 Jun 2003 15:27:55 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 23 Jun 2003 15:27:55 -0000 Received: (qmail 22575 invoked by uid 500); 23 Jun 2003 15:25:16 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 22562 invoked from network); 23 Jun 2003 15:25:16 -0000 Received: from unknown (HELO JTURNER) (207.86.123.243) by daedalus.apache.org with SMTP; 23 Jun 2003 15:25:16 -0000 Received: from JTURNER ([127.0.0.1]) by JTURNER with Microsoft SMTPSVC(5.0.2195.5329); Mon, 23 Jun 2003 11:25:17 -0400 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Virtual domains with Tomcat References: <200306201821.20625.stephen@totalflood.com> <001501c33965$f6443090$6e3da8c0@ev.co.yu> <3EF715D5.4030809@rci.rutgers.edu> Message-ID: Content-Type: text/plain; charset=iso-8859-15; format=flowed From: John Turner Date: Mon, 23 Jun 2003 11:25:17 -0400 In-Reply-To: <3EF715D5.4030809@rci.rutgers.edu> User-Agent: Opera7.03/Win32 M2 build 2670 X-OriginalArrivalTime: 23 Jun 2003 15:25:17.0724 (UTC) FILETIME=[A6C665C0:01C3399B] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Yes, AFAIK. As I understand it, the JK/JK2 connectors are pipelines, not pre-or post- processors. They send the request from Apache to Tomcat. When Tomcat receives the request, it is as if Apache doesn't even exist. Tomcat acts the same way it would act if using Tomcat stand-alone. I could be wrong, but I've never been able to successfully setup a virtual hosting configuration without defining my virtual hosts in both Apache's httpd.conf and Tomcat's server.xml. If there's a shortcut, I'd love to see it. John On Mon, 23 Jun 2003 10:59:33 -0400, Rick Anderson wrote: > When you use virtual hosts on apache2 with mod_jk2 does Tomcat have to > have the same virtual hosts defined in it's server.xml file? > > --Rick Anderson > > > John Turner wrote: > >> >> Yes. In general, for every Apache ServerName, you need a corresponding >> Host entry in Tomcat's server.xml. >> >> The Apache connectors are just pipelines, they do not do any work on >> behalf of Tomcat. Thus, when Tomcat receives the request, it has to do >> the same sort of host header processing that Apache has to do. If >> Tomcat cannot find a Host entry that corresponds to the HTTP Host Header >> it is receiving on the request, it will default to the host name listed >> in the defaultHost parameter in server.xml. Apache does the same >> thing...if it can't find a VirtualHost to match the host header, it >> defaults to the global VirtualHost, or rather the global ServerName. >> >> The syntax for defining a virtual host in Tomcat's server.xml is >> different than Apache's httpd.conf, but the principles and concepts are >> the same. >> >> John >> >> On Mon, 23 Jun 2003 11:00:58 +0200, Nikola Milutinovic >> wrote: >> >>>> How can I get Tomcat to recognize virtual domains? This is trivial >>>> with Apache and I can get Apache to fetch the correct jsp but I cannot >>>> get timcat to process it. If I turn off tomcat, apache sends the jsp >>>> source. If I turn tomcat on, I get the error 404 page >>> >>> >>> Anything in the logs? >>> >>> I'm not totally sure, but I think you need to match VHosts in your >>> Apache and your Tomcat. I'll be testing exactly that today with >>> mod_jk2, Apache 2.0.46 and Tomcat 4.1.24. For mod_webapp it is definite >>> - you need: >>> >>> >>> >>> >>> >>> >>> .... >>> >>> >>> >>> I think the same applies to all other connectors: mod_jk, mod_jk2 and >>> HTTP. >>> >>> Nix. >>> >> >> >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org