From owner-freebsd-questions@FreeBSD.ORG Thu Aug 2 06:07:09 2007 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 67BE016A418 for ; Thu, 2 Aug 2007 06:07:09 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: from pizzabox.cyberleo.net (alpha.cyberleo.net [198.145.45.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2A70213C46A for ; Thu, 2 Aug 2007 06:07:08 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: (qmail 17790 invoked from network); 2 Aug 2007 06:07:08 -0000 Received: from adsl-75-3-94-126.dsl.chcgil.sbcglobal.net (HELO ?172.16.44.14?) (cyberleo@cyberleo.net@75.3.94.126) by alpha.cyberleo.net with ESMTPA; 2 Aug 2007 06:07:08 -0000 Message-ID: <46B16B95.1030904@cyberleo.net> Date: Thu, 02 Aug 2007 00:28:30 -0500 From: CyberLeo Kitsana User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: =?UTF-8?B?U2TDpHZ0YWtlcg==?= References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: How to foward subdomains? 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: Thu, 02 Aug 2007 06:07:09 -0000 Sdävtaker wrote: > Hello > Sorry in advance for my english,it is not my main language. > I got a tiny network with 2 computers and only 1 external ip. > I configured my router to foward the dns port to machine1, and > registered it in nic as ns1.mydomain.com, i had successfully moved my > registered domains to that dns and could run all my services in that > machine, ie i can http://www.mydomain.com from outside. > After that i had setup a second machine in the network and i want to > make this one a subdomain of the first one ie second.mydomain.com, > this second machine got no external ip. > How can i set my first machine to foward all the traffic directed to > that domain? > Thanks for any help u can give me. > Sdav Just recently, I did something similar with two machines hosting a few domains and subdomains. I found the easiest thing to do was to set up squid in 'web accelerator' mode (also known as anti-slashdot mode) on my FreeBSD router, and direct it to forward requests (based on Host header) to the appropriate backend webserver. In your case, one server could be running on an alternate port on the same machine Squid is, or bound to a private IP alias. This is a touch annoying, though, as squid must know about /every/ /single/ subdomain that is hosted, lest it complain that it cannot fulfill the request. -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net Furry Peace! - http://wwww.fur.com/peace/