Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 21502 invoked from network); 6 Feb 2003 16:04:49 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 6 Feb 2003 16:04:49 -0000 Received: (qmail 2207 invoked by uid 97); 6 Feb 2003 16:06:18 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 2200 invoked from network); 6 Feb 2003 16:06:17 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 6 Feb 2003 16:06:17 -0000 Received: (qmail 16749 invoked by uid 500); 6 Feb 2003 16:03:42 -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 16506 invoked from network); 6 Feb 2003 16:03:39 -0000 Received: from mail.pmh.com (HELO pmh-mail.fh.pmh.com) (209.119.86.10) by daedalus.apache.org with SMTP; 6 Feb 2003 16:03:39 -0000 Received: by mail.pmh.com with Internet Mail Service (5.5.2653.19) id <1MLK94KN>; Thu, 6 Feb 2003 11:03:47 -0500 Message-ID: <83F0258A9996D311B14200A0C98F173602F22DEF@aas-internet.aas.com> From: "Turner, John" To: 'Tomcat Users List' Subject: RE: Tomcat and Apache Date: Thu, 6 Feb 2003 11:03:41 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N OK, that isn't going to work. If Tomcat only knows "localhost", calling it with 192.4.200.65 won't get anything. Also, in Apache's httpd.conf, an IP address isn't going to trigger any of the VirtualHost containers, which means there won't be any JkMounts triggered if your JkMounts are in mod_jk.conf, since everything in mod_jk.conf triggers off of ApacheConfig which triggers off the Host containers in server.xml (all of which say "localhost"). Here's what I do: - setup a default install...everything localhost, just like my HOWTO (http://www.johnturner.com/howto) - on my local desktop at home, set a record in my hosts file pointing to my server. I give that hosts record a name. So my hosts file on my desktop says something like: 192.168.1.x johns-server - in Tomcat's server.xml, I change all instances of "localhost" except for "defaultHost" to whatever I put in my hosts file - on my desktop, I call my server with a URL, in this case: http://johns-server/some/URL It works for me. On a live server (one that is publicly available), instead of using the value in the hosts file, just use the FQDN. John > -----Original Message----- > From: Richard Johnstone > [mailto:Richard.Johnstone@appleyard-contracts.co.uk] > Sent: Thursday, February 06, 2003 10:52 AM > To: tomcat-user@jakarta.apache.org > Subject: RE: Tomcat and Apache > > > Basically I call 192.4.200.65 from my PC. This is the IP address of my > server. > I have the servername in httpd.conf set to localhost and also the name > of the host as localhost > If I call the page from the actual webserver machine I use > > http://localhost/avcweb/servlet/MyClass > > from my pc I use > > http://192.4.200.65/avcweb/servlet/MyClass > > >>> JTurner@AAS.com 02/06/03 03:06pm >>> > > OK, is "999.99.999.99" == "localhost"? You have "localhost" as your > Host in > server.xml. Are you just being paranoid by disguising "localhost" > with > "999.99.999.99" or are you actually using some other value besides > "localhost" in your request URL? > > Basically, everything is a chain. One missing piece in the chain, and > it > doesn't work. > > - request www.host.com/avcweb/servlet/MyClass > - Apache scans httpd.conf, looking for a match for www.host.com. If > none > found, uses global defaults. If VirtualHost found, checks ServerName > - ServerName = no match, continue > - ServerName = match, scan VirtualHost directives > - does VirtualHost have JkMount? Check URL against JkMount > - if match to JkMount, lookup worker > - make worker connection to Tomcat > - send request to Tomcat > - Tomcat receives request on connector > - looks for Host match for www.host.com > - no match, falls to "defaultHost" > - match, looks for Context to match URL > - find Context match, try to resolve the rest of the URL into a valid, > available servlet, and serve content > - no Context match, 404 or some other error. > > So, things to check: > > - the VirtualHost in httpd.conf that you expect to use is the one > actually > being used > - it's ServerName is the one in the URL > - there's a valid JkMount > - there's a definition for the worker used in JkMount in > workers.properties > - the Tomcat host configured in workers.properties is > available on port > 8009 > (or some other port as long as it is consistent) > - Tomcat has a Host to match the one in the URL (and the one in > ServerName) > - Tomcat has a Context to match the URL > - Tomcat has a valid servlet mapping, explicit or implicit, for the > request > > You probably know all of this, but it is hard for me to see the big > picture > just by getting config snippets, so I am trying to provide a > description of > the "debugging method" that I would use if I was having the same > problem. > > HTH > > John > > > > -----Original Message----- > > From: Richard Johnstone > > [mailto:Richard.Johnstone@appleyard-contracts.co.uk] > > Sent: Thursday, February 06, 2003 9:53 AM > > To: tomcat-user@jakarta.apache.org > > Subject: RE: Tomcat and Apache > > > > > > Nope. Do I need to? > > I didn't realise I need to as the page loaded using > > http://999.99.999.99:8080/avcweb/servlet/MyClass, it's just > > http://999.99.999.99/avcweb/servlet/MyClass that doesn't seem to > work > > > > >>> JTurner@AAS.com 02/06/03 02:35pm >>> > > > > Did you map that servlet in web.xml?? > > > > John > > > > > > > -----Original Message----- > > > From: Richard Johnstone > > > [mailto:Richard.Johnstone@appleyard-contracts.co.uk] > > > Sent: Thursday, February 06, 2003 9:28 AM > > > To: tomcat-user@jakarta.apache.org > > > Subject: RE: Tomcat and Apache > > > > > > > > > OK, took all the stuff out of httpd.conf so all that is in > > > there in the > > > "loadmodule" and "include" > > > > > > In mod_jk.conf it has > > > > > > JkMount /avcweb ajp13 > > > JkMount /avcweb/* ajp13 > > > > > > So to call I am trying > > > > > > http://999.99.999.99/avcweb/servlet/MyClass > > > > > > Still no luck > > > > > > >>> JTurner@AAS.com 02/06/03 01:27pm >>> > > > > > > Well, what URL are you using? > > > > > > What ServerName are those JkMount statements tied to? > > > > > > If you're doing an Include of mod_jk.conf, you shouldn't have > > anything > > > in > > > httpd.conf but the "LoadModule" line and the "Include" line. > > > > > > My guess is your manually entered JK config in httpd.conf is > > > conflicting > > > with the generated config. > > > > > > Looks also like you are using Solaris, perhaps my Solaris HOWTO > can > > > help: > > > > > > http://www.johnturner.com/howto > > > > > > John > > > > > > > > > > -----Original Message----- > > > > From: Richard Johnstone > > > > [mailto:Richard.Johnstone@appleyard-contracts.co.uk] > > > > Sent: Thursday, February 06, 2003 6:02 AM > > > > To: tomcat-user@jakarta.apache.org > > > > Subject: Tomcat and Apache > > > > > > > > > > > > I apologise for sending this as I know there are about 50 > > > > posts daily on > > > > this subject but I can't get the 2 of these to link. > > > > I have checked the archives and help docs and everything > > > > seems in place > > > > but when I call my servlet without the 8080 port I get > > > > nothing. Looking > > > > at the apache logs it says > > > > > > > > > /opt/webFrontEnd/examples/servlet/avc.web.Clients.ClientsHomePage > > > > > > > > The /opt/webfrontend is my document root for apache > > > > > > > > There is no lines in the tomcat logs so apache isn't even > posting > > to > > > > tomcat > > > > > > > > I must have missed something simple but I can't see what it is. > > > > Any Help Please > > > > > > > > Here is what I have set up in the conf files > > > > > > > > SERVER.XML > > > > > > > > > > > > > > > modJk="/opt/apache/libexec/mod_jk.so" > > > > jkLog="/opt/apache/logs/mod_jk.log" jkDebug="info" > > > > /> > > > > > > > > > > > unpackWARs="true"> > > > > > > className="org.apache.ajp.tomcat4.config.ApacheConfig" > > > > append="true" /> > > > > > > > > > > > > HTTPD.CONF > > > > > > > > Include /opt/tomcat-4.0.6/conf/auto/mod_jk.conf > > > > LoadModule jk_module /opt/apache/libexec/mod_jk.so > > > > AddModule mod_jk.c > > > > > > > > JkWorkersFile /opt/tomcat-4.0.6/conf/jk/workers.properties > > > > JkLogFile /opt/apache/logs/mod_jk.log > > > > JkLogLevel info > > > > > > > > JkMount /* ajp13 > > > > JkMount /examples/* ajp13 > > > > JkMount /avcweb/* ajp13 > > > > > > > > WORKERS.PROPERTIES > > > > > > > > workers.tomcat_home=/opt/tomcat-4.0.6 > > > > workers.java_home=/opt/jdk1.4.1 > > > > ps=/ > > > > worker.list=ajp13 > > > > > > > > worker.ajp13.port=8009 > > > > worker.ajp13.host=localhost > > > > worker.ajp13.type=ajp13 > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > > For additional commands, e-mail: > tomcat-user-help@jakarta.apache.org > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org