From owner-freebsd-questions@FreeBSD.ORG Fri Nov 30 17:30:01 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46FBC16A417 for ; Fri, 30 Nov 2007 17:30:01 +0000 (UTC) (envelope-from nomadlogic@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 0660613C458 for ; Fri, 30 Nov 2007 17:30:00 +0000 (UTC) (envelope-from nomadlogic@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so583769anc for ; Fri, 30 Nov 2007 09:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=BDWZmltYHL4arCCiXuzHVQ/nX+vX5gaT3UVfAi++wUU=; b=j36ijHYEDA4uBzsUt3wocftlFYEBpHaqUeGZqifG4GmH0njq5BsSoKH5XKYXv+0Eu+eCptv0dA4M7I3YFjxN/JAL7c3oyXbG9dtb2fh4FcOfmLDl6YEydJtXgcLO/prTQQbBQQanmUwKAGr1npCtAeSrCtG1gJ8nktiXl1jqSE0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=au4A/wMsg9bOzy88pKpFX8QreAsEv7aIshFR/CM5BlBfPN7ejCmlFO/T4ZXMvsmsntunexaa6EKypWJMy3P61UBWG3pZohOCc7rMHL6KBvmeQfpIwk2NcS2BW8V8fSUShInz3Ebn6p+KfOsvLeuGi5OUDMyhuFFfW+I1VraOvy0= Received: by 10.100.206.11 with SMTP id d11mr14649718ang.1196442316483; Fri, 30 Nov 2007 09:05:16 -0800 (PST) Received: by 10.100.215.10 with HTTP; Fri, 30 Nov 2007 09:05:16 -0800 (PST) Message-ID: <57d710000711300905s71a6c638mad7546ff3416e932@mail.gmail.com> Date: Fri, 30 Nov 2007 09:05:16 -0800 From: "pete wright" To: "Lucas Neves Martins" In-Reply-To: <49eaeb190711300559u34557d6bha38a72d84a65caca@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <49eaeb190711300559u34557d6bha38a72d84a65caca@mail.gmail.com> Cc: questions@freebsd.org Subject: Re: Firewall Redirect X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2007 17:30:01 -0000 On Nov 30, 2007 5:59 AM, Lucas Neves Martins wrote: > Hello guys, > > I=B4m having the following problem: > > Redirect requests from the port 80, to the port 8082. - for apache tomcat= . > > I=B4m new on freeBSD, Of course, I had looked out on google, and read the > firewall section on the Handbook. > snipping some ipfw rules... > > PS: I=B4m trying to do this, to make the user "tomcat" run the apache-tom= cat, > opening the port 8082, and make it > > transparent to users who access the domain by the common port 80. > another method to achieve this that may be interesting for you is to use mod_jk to redirect requests coming in on your priv'd port 80 apache daemon to your tomcat processes on an unpriv'd port: http://tomcat.apache.org/connectors-doc/ I won't go into the whole configuration here - but going this route may give you more flexibility than using a packetfilter ruleset and will allow you take advantage of load balancing etc. with mod_jk as well. i currently use this setup for a site that serves both static content from httpd and .jsp pages from tomcat all on the same box. HTH -pete --=20 ~~o0OO0o~~ Pete Wright www.nycbug.org NYC's *BSD User Group