Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 39047 invoked by uid 500); 18 Oct 2001 10:29:06 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 39007 invoked from network); 18 Oct 2001 10:29:05 -0000 Sender: jfclere@vtxrm2.bcn.fsc.net Message-ID: <3BCEAF11.E94C4AD9@fujitsu-siemens.com> Date: Thu, 18 Oct 2001 12:29:37 +0200 From: jean-frederic clere Reply-To: jfrederic.clere@fujitsu-siemens.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.7 i686) X-Accept-Language: en, fr, de MIME-Version: 1.0 To: tomcat-user@jakarta.apache.org Subject: Re: Reversed deployment configuration for mod_webapp... References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Pier Fumagalli wrote: > > I've been looking in the past month at which were the main difficulties in > mod_webapp usage, and I think that the most difficult part for users comes > when someone tries to deploy a web-application both in server.xml and > httpd.conf. Why? Let's see an example: > > httpd.conf > ---------- > ServerName myhost.domain.dom > Port 80 > WebAppConnection conn warp myhost.domain.dom:8008 > WebAppDeploy examples conn /examples > > server.xml > ---------- > > > className="...WarpHost"> > > > > > > To the random viewer, this looks like a valid configuration, the context > deployed in server.xml should be seen under /examples by Apache... > > BUT (yeah, there's always a but), what's going to happen is that when run, > we're going to have TWO instances of the examples context: one deployed for > the "localhost" host (configured in server.xml) and one configured for > "myhost.domain.dom" (configured in httpd.conf and autodeployed by WARP). > > Basically, if you're not careful enough, things are going to be screwed up, > and you won't get what you want. - Sure I have tried to help several time in user list about this... > > One possible solution to the problem would be to reverse the deployment > scheme of WARP. If we put all context configurations in server.xml, and add > a directive such as "WebAppDeployAll true", what we can achieve is that for > a particular or root the root server configured in > httpd.conf, we're going to automatically retrieve all contexts configured in > server.xml for that particular host. Like "JkAutoMount * myworker1 *" (in a ). > > This will solve a bunch of problems, but there is one tiny little bit that > is still lacking from Catalina, and that makes things hard: apache, and all > other webservers, use the "Host" header to select what named virtual host > I'm using. The "Host" header, though, is formatted in this way: "host:port". > > So, what it basically means is that a virtual host name is made up by two > values: the name and the port. Catalina standalone works great, because I > can just set up two connectors in two engines, with two different ports, and > have different behaviours for two virtual hosts having the same name but > different port values. > > When coming down to WARP, we have one single connector getting all requests > thru one single port, so, what we need to do is use a selector also over on > a port to figure out the "real" virtualhost (host:port) to use. What about using host_port (or any character is not valid in hostname)? When I try to add server localhost_8080 J2EE gives a funny error message "Cannot connect to host". > > I'm planning to implement this mapping in the Warp* classes (not to break > anything back), basically rewriting the map methods and adding a > setPort/getPort property into host. But by doing this I won't be able to use > the Standard* implementation of the Catalina stuff... My only problem is how > this could cope with the Manager Application. Specialy how to detect that sometime has changed? > > Pier