From owner-freebsd-isp Thu Oct 5 10:46:37 2000 Delivered-To: freebsd-isp@freebsd.org Received: from irev.net (irev.net [63.101.244.233]) by hub.freebsd.org (Postfix) with ESMTP id 3109237B502 for ; Thu, 5 Oct 2000 10:46:34 -0700 (PDT) Received: from localhost (presence@localhost) by irev.net (8.11.0/8.9.3) with ESMTP id e95HkUa61828 for ; Thu, 5 Oct 2000 10:46:31 -0700 (PDT) (envelope-from presence@irev.net) Date: Thu, 5 Oct 2000 10:46:25 -0700 (PDT) From: Presence To: freebsd-isp@FreeBSD.ORG Subject: Re: Apache vhosts question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm going to jump in here too with my results: my DNS tables look something like: irev.net. SOA ns1.ncsdi.net. root.irev.net. IN A 63.101.244.233 www IN CNAME irev.net. mail IN CNAME irev.net. and another domain would look similiar to the above like: root.ws. SOA ns1.ncsdi.net. root.root.ws. IN A 63.101.244.233 www IN CNAME root.ws. so there's specifically http://(www.)irev.net/ , http://mail.irev.net/, and http://(www.)root.ws/ all pointing (with CNAME's!) to the one IP address. Apache (from ports, stock, I hate typing stuff) would look like: NameVirtualHost 63.101.244.233 # irev.net (http://irev.net and http://www.irev.net) DocumentRoot /usr/home/webs/irev ServerName irev.net ServerAlias www.irev.net ErrorLog /var/log/httpd/irev/error.log CustomLog /var/log/httpd/irev/access.log combined # mail.irev.net DocumentRoot /usr/home/webs/irev/twig ServerName mail.irev.net ErrorLog /var/log/httpd/twig/error.log CustomLog /var/log/httpd/twig/access.log combined # root.ws (http://root.ws and http://www.root.ws) DocumentRoot /usr/home/webs/root ServerName root.ws ServerAlias www.root.ws ErrorLog /var/log/httpd/root/error.log CustomLog /var/log/httpd/root/access.log combined So what I'm doing (successfully) is the one line for the NameVirtualHost, then each block uses that IP. The ServerAlias lines cover for urls with and without www's. If something in DNS points to my IP, and isn't listed in a block, Apache defaults to the first block, which is convenient. Presence Morrigan o Inner Revolution BBS o 877-Im-31337 http://root.ws/ o http://irev.net/ o root@root.ws > I've seen the same problem and it was becuase the names were CNAMEd and > not IN A records in DNS. > > > > I am trying to set up name-based virtual hosts on apache 1.3.12. No matter how many > > > hosts I enter, apache only displays the first one in the configuration file. For > > > example: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message