From owner-freebsd-questions@FreeBSD.ORG Tue Feb 19 01:07:17 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BAB316A469 for ; Tue, 19 Feb 2008 01:07:17 +0000 (UTC) (envelope-from oscartheduck@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by mx1.freebsd.org (Postfix) with ESMTP id 3302D13C45E for ; Tue, 19 Feb 2008 01:07:16 +0000 (UTC) (envelope-from oscartheduck@gmail.com) Received: by wr-out-0506.google.com with SMTP id 68so1430592wri.3 for ; Mon, 18 Feb 2008 17:07:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=fVruAAN9J7ZeIiKHYBYRyVye0wDRvb2YnVBni+RQQgE=; b=CHSNvEdJdGx93QFDs4xG1ltGTs2q4GsEE+KwYwfdw7ObYmjiaE9I6K782vXGxFGhiAkkku7nZZaapMV5v5TmGuZm93TlkWIH+DQKYXbLoZZLoBONpEjXIHR5jpTJSHZB3pvMTEA6DTnnRJ8qY3CHk6IKkFQkXnmjRCBY/nE1cHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=Tj1Mto1Ave0pL55T8MKHplOKLY/1RUXjsiqfRA3TFbg6/zTPgpXhfGu+oD9XDjGAfSctbYW5ZDkZPzv1XuTDjP7ejp8gqcm4Kxuyq6Ptoj+cAhzSSm6+BI5xb2rfJ0CVIW3FBN18k7wyqFwbYVlm+RtlHoMPStzbbSiWlX3S9zw= Received: by 10.143.9.5 with SMTP id m5mr4892927wfi.94.1203383235403; Mon, 18 Feb 2008 17:07:15 -0800 (PST) Received: from ?192.168.1.104? ( [68.35.151.186]) by mx.google.com with ESMTPS id 28sm18554339wfg.17.2008.02.18.17.07.13 (version=SSLv3 cipher=RC4-MD5); Mon, 18 Feb 2008 17:07:13 -0800 (PST) From: James To: Da Rock In-Reply-To: <1203382458.6470.32.camel@laptop2.herveybayaustralia.com.au> References: <1203382458.6470.32.camel@laptop2.herveybayaustralia.com.au> Content-Type: text/plain Date: Mon, 18 Feb 2008 18:07:12 -0700 Message-Id: <1203383232.5883.2.camel@pclmills> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Configuring mod_jk for Apache and Tomcat X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: oscartheduck@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 01:07:17 -0000 On Tue, 2008-02-19 at 10:54 +1000, Da Rock wrote: > I'm trying to setup a tomcat server using Apache as the frontend. As > usual, I'm having trouble (which is why I haven't bothered before, and > given Tomcat apps a wide berth). Can someone let me know where I'm going > wrong? I have setup inclusions in the httpd.conf file to use similar > settings to other modules, etc. Therefore my worker.properties and > mod_jk.conf is under /extras. > > I know something works because they are reflected when I navigate > to /webapps on the Apache server. > > mod_jk.conf: > # Replace jsp-hostname with the hostname of your JSP server, as > # specified in workers.properties. > # > > JkWorkersFile etc/apache22/extra/workers.properties > JkLogFile /var/log/jk.log > JkShmFile /var/log/jk-runtime-status > JkLogLevel error > > # Sample JkMounts. Replace these with the paths you would > # like to mount from your JSP server. > JkMount /*.jsp localhost > JkMount /servlet/* localhost > JkMount /examples/* localhost > > > # Map encoded urls > > SetHandler jakarta-servlet > > > # Map subdirectory > > SetHandler jakarta-servlet > > > > > workers.properties: > # Incredibly simple workers.properties file, intended for connecting > # to one host, via AJP13. See the tomcat documentation for > # information on more exotic configuration options. > # > # Change jsp-hostname to the hostname of your JSP server. > # > worker.list=localhost > workers.tomcat_home=/usr/local/apache-tomcat6.0 > workers.java_home=/usr/local/diablo-jdk1.5.0 > worker.localhost.port=8009 > worker.localhost.host=localhost > worker.localhost.type=ajp13 > worker.localhost.lbfactor=1 > > > I figured I didn't need to worry about the setenv variable as I'm only > testing currently and only need one connector atm. > > Any ideas why I shouldn't be seeing the index.jsp found in the Tomcat > directories? > > I also tried navigating directly using port 8009 with no result either > (And yes, Tomcat has been started- I checked the port using nmap). > The two things I always screw up: permissions and DNS. If your /etc/hosts isn't set up properly, and/or hosts.conf's URL entries aren't correct, weird weird errors can happen. If something is set to 444 instead of 755 (as appropriate), other weirdnesses occur. Are you using a www user? Make sure they're added as appropriate for the file. I know *none* of this may be helpful, but I always check those and I've usually screwed one up. Otherwise, is there anything in /var/log/httpd-error?