Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 42179 invoked from network); 10 Jul 2008 15:45:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jul 2008 15:45:39 -0000 Received: (qmail 68711 invoked by uid 500); 10 Jul 2008 15:45:06 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 68691 invoked by uid 500); 10 Jul 2008 15:45:06 -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 68680 invoked by uid 99); 10 Jul 2008 15:45:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 08:45:06 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 15:44:13 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KGyJv-0004AT-55 for users@tomcat.apache.org; Thu, 10 Jul 2008 08:44:35 -0700 Message-ID: <18385568.post@talk.nabble.com> Date: Thu, 10 Jul 2008 08:44:35 -0700 (PDT) From: Tim Redding To: users@tomcat.apache.org Subject: Apache/mod_jk serves random files from tomcat MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: timr@tribalddb.co.uk X-Virus-Checked: Checked by ClamAV on apache.org Hi, We are experiencing intermittent problems with a particular site that is not returning the correct file that is requested. For instance if we request the index.html file we actually get a css file or even an image. From the apache access log you can see that the size of the index.html file grows on the second request. This is because a gif was actually returned. XXX.XXX.XXX.130 - - [10/Jul/2008:15:10:39 +0100] "GET /index.html HTTP/1.1" 200 1068 XXX.XXX.XXX.130 - - [10/Jul/2008:15:13:10 +0100] "GET /index.html HTTP/1.1" 200 9526 XXX.XXX.XXX.130 - - [10/Jul/2008:15:13:48 +0100] "GET /index.html HTTP/1.1" 200 1086 No error messages are logged in the mode_jk.log file. We have Apache/2.2.3 on the front on a Tomcat 6.0.16 server with mod_jk (version unknown but fairly recent). We have all assets in our war file. When we hit Tomcat directly on port 8080 it serves the correct file. And to fix the problem an apache restart seems to sort things out. On this server with have 2 vhosts. One is a simple nothing fancy static site and the other forwards everything to our Tomcat server. Below I've included our mod_jk config and a snippet of our httpd.conf. Any ideas or things to try would be most appreciated. Tim. ============= mod_jk.conf ========== # Load mod_jk module # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkOptions indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat "%w %V %T" # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile logs/jk.shm # original URL pass through JkEnvVar ORIGINAL_URI w00t # Add jkstatus for managing runtime data JkMount status Order deny,allow Deny from all Allow from 127.0.0.1 ======= httpd.conf (our additions to the default file) ====== # mod_jk include Include conf/mod_jk.conf DocumentRoot /var/www/html/ ServerName example.co.uk ErrorLog logs/default-error.log CustomLog logs/default-access.log common alias /logs /var/widgets AuthUserFile /var/widgets/.htpasswd AuthName "Widgets" AuthType Basic Require valid-user Rewriteengine on RewriteRule ^/$ /index.html [R] jkmount /* loadbalancer jkunmount /logs/*.gz loadbalancer DocumentRoot /var/www/html/ ServerName widgets.example.co.uk ErrorLog /var/widgets/widget-error.log CustomLog /var/widgets/widgets-access.log common jkunmount /* loadbalancer ======= worker.properties ====== worker.list=loadbalancer,status worker.node1.port=8009 worker.node1.host=127.0.0.1 worker.node1.type=ajp13 worker.node1.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1 worker.status.type=status -- View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p18385568.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- 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