From owner-freebsd-questions@FreeBSD.ORG Thu Jun 12 01:41:06 2003 Return-Path: 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 717D537B404 for ; Thu, 12 Jun 2003 01:41:06 -0700 (PDT) Received: from stjohn.stjohn.ac.th (stjohn.stjohn.ac.th [202.21.144.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D2F643F93 for ; Thu, 12 Jun 2003 01:40:57 -0700 (PDT) (envelope-from mcrogerm@stjohn.ac.th) Received: from tulip.stjohn.ac.th ([203.151.134.104]) by stjohn.stjohn.ac.th (8.9.3+Sun/8.9.3) with ESMTP id PAA12957 for ; Thu, 12 Jun 2003 15:38:49 +0700 (ICT) Message-Id: <5.2.0.9.0.20030612150301.00a0b0e0@127.0.0.1> X-Sender: stjohn.stjohn.ac.th:mcrogerm@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 12 Jun 2003 15:40:50 +0700 To: freebsd-questions@FreeBSD.ORG From: Roger Merritt Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Entry in /etc/hosts not used X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2003 08:41:06 -0000 I've been trying to install a Content Management System for evaluation purposes. The system needs to have some virtual domains set up and the docs recommend putting the dummy addresses in the /etc/hosts file. That's fine by me, because I use /etc/hosts for all the DNS queries for machines on my LAN, but I had not realized a single IP address could resolve to more than one name. The entries in /etc/hosts are: 10.3.16.125 editor.imp.ac.th editor 10.3.16.125 www.imp.ac.th www 10.3.16.125 admin.imp.ac.th admin 10.3.16.125 su.imp.ac.th su My resolv.conf file is: domain imp.ac.th nameserver 202.21.144.1 My host.conf file is: # $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $ # First try the /etc/hosts file hosts # Now try the nameserver next. bind # If you have YP/NIS configured, uncomment the next line # nis At this point, I'm baffled. Apache is running on the machine that acts as the server for the office lan as well as the gateway to the internet. I have two NIC's, ed0 set as 203.151.134.xxx, and ed1 set as 10.3.16.125. If I set all four names to the IP address 203.151.134.xxx, I'm able to ping three of them from machines on my LAN, but not editor.imp.ac.th. When I set the four names to the IP address 10.3.16.125, I'm not able to ping any of them from the LAN. When I changed the entries in /etc/hosts back to 10.3.16.125, I'm still able to ping admin, www, and su, but ping shows their addresses as still being 203.151.134.xxx! When I point my browser (Mozilla, 1.3.1) at www, admin, or su.imp.ac.th, it displays the root document from the Content Management System I'm trying to configure, but it gives me an error message, "editor.imp.ac.th could not be found, please check and try again". I'm baffled and haven't been able to find anything from Google searches. I don't understand why the name editor.imp.ac.th is being treated differently from the other three, and I don't understand why I can ping the interface *not* in my LAN but not the interface that directly connects with the machines in my LAN. Can anyone suggest what to try next? Oh -- it's essential I be able to connect my browser to editor.imp.ac.th, because that's the only way to log in to the CMS. -- Roger