From owner-freebsd-questions Sun Oct 17 9:25:32 1999 Delivered-To: freebsd-questions@freebsd.org Received: from merlins.force9.net (merlins.force9.net [195.166.128.23]) by hub.freebsd.org (Postfix) with SMTP id 2176E14A13 for ; Sun, 17 Oct 1999 09:25:22 -0700 (PDT) (envelope-from ric@sinclairassoc.force9.co.uk) Received: (qmail 5872 invoked from network); 17 Oct 1999 16:25:20 -0000 Received: from mayfly.plus.net.uk (HELO mayfly.force9.net) (195.166.128.28) by merlins.force9.net with SMTP; 17 Oct 1999 16:25:20 -0000 Received: (qmail 336 invoked from network); 17 Oct 1999 16:25:19 -0000 Received: from unknown (HELO sinclairassoc.force9.co.uk) (212.56.95.157) by mayfly.plus.net.uk with SMTP; 17 Oct 1999 16:25:19 -0000 Message-ID: <3809F85D.60239718@sinclairassoc.force9.co.uk> Date: Sun, 17 Oct 1999 17:25:01 +0100 From: Richard Morte Organization: Sinclair Associates X-Mailer: Mozilla 4.61 [en] (X11; I; FreeBSD 3.2-RELEASE i386) X-Accept-Language: en-GB, en MIME-Version: 1.0 To: "freebsd-questions@FreeBSD.ORG" Subject: DNS Implications for VHosts on Apache Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I have configured Apache 1.3.6 for name virtual hosts on an intranet. The domains are for clients' web pages during development. The web server delivers content to the network machines, but I have kludged my local DNS to get it working. rc.conf: (no problems here): network_interfaces="lo0 pn0 tun0" ifconfig_pno="inet 192.168.120.1 netmask 255.255.255.0" ifconfig_pno_alias0="inet 192.168.120.100 netmask 0xffffffff" # for Apache named.conf: (again, no problems here): <...usual stuff...> zone "local" in { type master; file "db.local"; notify no; }; <... more zones...> db.local: (I'm sure this isn't the right way to do it...): @ IN SOA local. root.local. ( usual stuff...) IN NS sparky.at.home. sparky IN A 192.168.120.100 www.client1.local. IN A 192.168.120.100 www.client2.local. IN A 192.168.120.100 <...etc...> httpd.conf: (and this seems OK): BindAddress 192.168.120.100 <> NameVirtualHost 192.168.120.100 ServerName www.client1.local <...additional vhost directives...> etc, for each client in turn. By using Name Virtual Hosting I can use just the one IP address on which Apache listens.For local network machines to resolve the URL enterd in the browser, DNS is set up as in db.local - but the FQDNs in that file effectively duplicate the same address. Running NSLINT seems to regard this as an error with "...already in use" messages. It also reports no PTR records - which is correct: there aren't any. But if I were to set up an in-addr.arpa file to resolve IP addresses to names, I can't see it working because the 1 IP address will resolve to multiple domain names. (I'm not sure what a browser would make of that - it would probable fall through the VH sections in httpd.conf and end up in the _default_ section). I would like to stick with name virtual hosting if I can (next stage is to use dynamically configured VH using the ``VirtualDocumentRoot /www/data/%0/htdocs'' directive, where %0 is a placeholder for the Server Name off the host: header). So, do I: a) forget name-virtual hosting and use lots of IP addresses /OR b) try using CNAMEs in DNS (but how about the PTRs) /OR c) forget about DNS, just add more entries to /ect/hosts (but then this has to be repeated on every client - this is not so good) /OR d) stick with what I've got - it works, so why worry /OR e) try something else? Can anyone suggest how best to proceed? How is this done in real-world situations? Regards, Ric To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message