From owner-freebsd-questions Thu Feb 13 13:36:20 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EA3837B401 for ; Thu, 13 Feb 2003 13:36:18 -0800 (PST) Received: from ra.dweebsoft.com (ra.dweebsoft.com [209.237.40.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 244FA43F93 for ; Thu, 13 Feb 2003 13:36:16 -0800 (PST) (envelope-from daxbert_news@dweebsoft.com) Received: from daxhome (anubis.dweebsoft.com [64.81.58.36]) by ra.dweebsoft.com (8.12.6/8.12.3) with SMTP id h1DLaE47078094; Thu, 13 Feb 2003 13:36:14 -0800 (PST) (envelope-from daxbert_news@dweebsoft.com) Message-ID: <025301c2d3a7$ef56af70$8a01a8c0@dweebsoft.com> From: "Daxbert" To: , References: <00ee01c2d3a6$52e73070$aeb423cf@3bagsmedia> Subject: Re: Silly question re: Apache NameVitualHost directive Date: Thu, 13 Feb 2003 13:36:14 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4920.2300 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > I'm wondering why/how I can get multiple NameVirtualHost IP addresses to > answer? > > For example, I have one IP listed in the NameVirtualHost directive (e.g. > 11.22.33.44), in my VitualHost 'containers' I use that IP like so: > etc. For some reason, I've never been able to > get a * to work on FreeBSD? Anyway, I have several Ips aliased on the > NIC and I'd like to use them as separate NameVirtualHost addresses, so > that I can also point domains to 11.22.33.55 and have them respond to > the directives. At the moment, I can't seem to > get this working? All you need is multiple NameVirtualHost directives in your httpd.conf Example: NameVirutalHost 11.22.33.44 NameVirutalHost 11.22.33.55 NameVirutalHost 11.22.33.66 Second, when you're doing NameVirtualHost, you should avoid using IP based names in virtualhost. The purpose of Named hosts, is to use the browser supplied host header to identify which virtual server to use. Then when apache parses the it will lookup the IP for the given name, and if it matches one of the NameVirtualHosts, name based hosting will be used for that host. You will get a warning if you have a NameVirtualHost directive, and none of the Vhosts have a name which resolves to that IP. --daxbert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message