Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 87958 invoked from network); 11 Sep 2007 04:14:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2007 04:14:54 -0000 Received: (qmail 27690 invoked by uid 500); 11 Sep 2007 04:14:35 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 27659 invoked by uid 500); 11 Sep 2007 04:14:35 -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 27648 invoked by uid 99); 11 Sep 2007 04:14:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 21:14:35 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DATE_IN_PAST_03_06,FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jak-tomcat-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2007 04:16:05 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IUx48-0004LX-4D for users@tomcat.apache.org; Tue, 11 Sep 2007 06:09:32 +0200 Received: from ip216-239-72-166.vif.net ([216.239.72.166]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Sep 2007 06:09:32 +0200 Received: from ebenze by ip216-239-72-166.vif.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Sep 2007 06:09:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: users@tomcat.apache.org From: "Eric B." Subject: Re: How to manage Apache error msgs when Tomcat is down? Date: Mon, 10 Sep 2007 21:04:24 -0400 Lines: 53 Message-ID: References: <46E1779C.70804@christopherschultz.net> <46E2ED85.7040503@kippdata.de> X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip216-239-72-166.vif.net X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Response Sender: news X-Virus-Checked: Checked by ClamAV on apache.org >> Sorry - I guess I wasn't specific enough. The HTTP status code that I >> got from Apache was 200 hence the OK. I assumed that it was probably 200 >> since I was actually able to communicate with Apache itself, even though >> its request to tomcat was unavailable. Or unless I am missing something >> in my apache configuration to display the correct error page. >> >> If I check the headers sent using Fiddler, I get the following: >> HTTP/1.1 200 OK >> Date: Fri, 07 Sep 2007 18:04:51 GMT >> Server: Apache/2.0.52 (White Box) >> Content-Length: 501 >> Connection: close >> Content-Type: text/html; charset=iso-8859-1 >> >> However, it is definitely not "OK" b/c my tomcat server is down. >> >> Do I have something foobar'ed in my apache config? Or is it a problem in >> my mod_jk params? If it makes any difference, I am running mod_jk >> v1.2.10 w/ Apache 2.0.52. > > JK version 1.2.10 is very old. A lot of things changed until we now > reached 1.2.25. Typically backend problems will be answered with a non 200 > status code. Try a more recent version (like 1.2.25). Thanks for the tip. I did just that and upgrade to 1.2.19 (I couldn't find any binaries for 1.2.25 compiled for http 2.0.52 - running CentOS4 and the latest httpd is 2.0.52-32 - would any binaries later than 1.2.19 work on that build?), and the status codes are returning properly now. I get 503 when my tomcat server is down, which made it very easy to then configure Apache with a standard ErrorDocument 503 msg in httpd.conf. However, this does raise an interesting question for me now. I haven't tried this, so don't know if/how it would work. If I am mapping an entire directory in my virtual host - ie: JkMount /tomcat/* and my tomcat server is unavailable, it will return a 503 error status, which httpd will then respond with an appropriate error document. Can I customize the error page on a per mount basis by creating a .htaccess file in my /tomcat/ directory within my httpd file workspace? Given that httpd is supposed to be ignoring that directory altogether (ie: passing all requests over to tomcat thru the jk connector), will it even see / read the .htaccess file? If not, do I need to manually add a JkUnmount /tomcat/.htaccess command? Or is there a better way to do this to have apache still read the .htaccess file even if the entire path is mapped to a jk connector? Thanks for the info / help! Eric (sorry if this is posted multiple times - I seem to be having trouble with my relay server) --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org