From owner-freebsd-questions Thu Dec 9 7:32:51 1999 Delivered-To: freebsd-questions@freebsd.org Received: from trinity.lee.net (trinity.lee.net [208.229.121.1]) by hub.freebsd.org (Postfix) with ESMTP id D0B13152C6 for ; Thu, 9 Dec 1999 07:32:37 -0800 (PST) (envelope-from awells@journalstar.com) Received: from journalstar.com (leepcD-195.sub-d.lee.net [208.205.127.195]) by trinity.lee.net (8.9.1/8.9.0) with ESMTP id JAA31131 for ; Thu, 9 Dec 1999 09:32:34 -0600 Message-ID: <384FCC1C.553F394C@journalstar.com> Date: Thu, 09 Dec 1999 09:34:52 -0600 From: Tony Wells X-Mailer: Mozilla 4.61 [en] (X11; I; FreeBSD 3.0-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: Re: Virtual hosts References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The NameVirtualHost is for hosts that all exist on the same IP, where the server looks at the header sent by the browser to determine which is the correct virtual host to serve the page. I assume you want unique IP's for each of your servers so use the VirtualHost directive. Each VirtualHost should have a unique IP. Make sure you have a Listen directive for each of your IP's so Apache will know to connect to those IP's. You'll need something like: Listen xxx.xxx.76.131:80 for each VirtualHost. Can you ping the aliases that you set up using ifconfig? If not try setting up your aliases using a netmask of 255.255.255.255. Matthew Jonkman wrote: > > I'm trying to set up apache with the frontpage extensions and use virtual > hosts. I've set up the http.conf with > > > ServerAdmin jonkman@bussert.com > DocumentRoot /usr/local/www/data/132/ > ServerName MY DOMAIN NAME > ErrorLog logs/132-error_log > CustomLog logs/132-access_log common > > > for each IP and rc.conf uses > > ifconfig_mx0="inet xxx.xxx.76.130 netmask 255.255.255.248" > ifconfig_mx0_alias="inet xxx.xxx.76.131 netmask 255.255.255.248" > ifconfig_mx0_alias="inet xxx.xxx.76.132 netmask 255.255.255.248" > > and so on for all 10 virtual hosts I need. Apache won't start and says it > the virtual hosts overlap eachother, perhaps I need a NameVirtualHost > directive. > > So I do the NameVirtualHost like so... > > NameVirtualHost xxx.xxx.76.130:80 > NameVirtualHost xxx.xxx.76.131:80 > NameVirtualHost xxx.xxx.76.132:80 > > and I apache won;t start and gives me > > [Sun Dec 5 23:36:04 1999] [warn] NameVirtualHost xxx.xxx.76.130:80 has no > VirtualHosts > [Sun Dec 5 23:36:04 1999] [warn] NameVirtualHost xxx.xxx.76.130:80 has no > VirtualHosts > [Sun Dec 5 23:36:04 1999] [warn] NameVirtualHost xxx.xxx.76.130:80 has no > VirtualHosts > > for all my IP's. > > I seem to think it may be related to the alias and all the IP's being on a > single interface, but I don;t know a different way to do it. Can anyone > help? Please! > > Thanks > > Matthew Jonkman > Bussert Consulting > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message