From owner-freebsd-questions Tue Jul 4 9: 2:48 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ahab.COM (24-29-146-97.nyc.rr.com [24.29.146.97]) by hub.freebsd.org (Postfix) with ESMTP id 377F537B585 for ; Tue, 4 Jul 2000 09:02:39 -0700 (PDT) (envelope-from moxie@ahab.com) Received: from localhost (moxie@localhost) by sseye.ahab.com (8.9.3/8.9.3) with ESMTP id LAA02850; Tue, 4 Jul 2000 11:45:09 -0400 (EDT) (envelope-from moxie@ahab.com) Date: Tue, 4 Jul 2000 11:45:09 -0400 (EDT) From: Jason T X-Sender: moxie@localhost To: Willem Brown Cc: questions@FreeBSD.ORG Subject: Re: Apache Virtualhosts an multiple addresses In-Reply-To: <20000704171215.G15794@snoopy.brwn.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It's advised (check apache virtual hosting docs carefully) to use the IP address as the argument to the virtual host, whether it's name-based or not. So it would look like this: DocumentRoot /www/loadabricks ServerName www.loadabricks.com # etc Apache matches first on the IP address in the VirtualHost line, then uses the Host: header supplied by the client to match to the ServerName. This works even if you have many virtual hosts.. One of the other nice features of this is that you can set up the VirtualHost before the DNS is targeted properly... if the DNS is not correct, using will cause apache to complain. On Tue, 4 Jul 2000, Willem Brown wrote: > Hi, > > You should maybe read the Apache docs on it because what Marc showed > you is name based virtual hosting. > > http://www.apache.org/docs/vhosts/index.html > > and this might also be of interest. > > http://www.apache.org/docs/mod/core.html#serveralias > > Regards > Willem Brown > > On Tue, Jul 04, 2000 at 08:12:32AM -0400, Nathan Vidican wrote: > > Spikeman wrote: > > > > > > Yes,, you can set up a vhost in apache, you should beable > > > to do this on the vhosts dir in your apache conf dirs.. > > > just change the needed info... should look someting > > > like this.. > > > > > > > > > ServerAdmin webmaster@host.some_domain.com > > > DocumentRoot /home/web000/public_html > > > ServerName 192.168.0.0 > > > ErrorLog logs/192.168.0.0-error_log > > > TransferLog logs/192.168.0.0-access_log > > > ScriptAlias /cgi-bin/ /home/web000/public_html/cgi-bin/ > > > > > > > > > Nathan Vidican wrote: > > > > > > > Is it possible, to have name-based virtual hosting wherein any given > > > > virtual host can be accessed as somehost.com, or www.somehost.com; > > > > preferably without having to add to virtual hosts to the system? > > > > > > > > -- > > > > Nathan Vidican > > > > webmaster@wmptl.com > > > > Windsor Match Plate & Tool Ltd. > > > > http://www.wmptl.com/ > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > > with "unsubscribe freebsd-questions" in the body of the message > > > > > > -- > > > ___ > > > /\ \ phase two of global domination in operation, hide all lions. > > > /::\ \ > > > /:/\:\ \ Comments or Questions email spikeman@myself.com > > > _\:\~\:\ \ > > > /\ \:\ \:\__\ Spikeman spikeman@myself.com > > > \:\ \:\ \/__/ http://www.spikeman.net > > > \:\ \:\__\ Find Me On EFNET /whois Spikeman > > > \:\/:/ / > > > \::/ / Friends are lights in winter; > > > \/__/ The older the friend, the brighter the light. > > > > Again, I am using NAME based hosting, there are almost 200 sites hosted > > on that one IP address. My virtualhost setup looks something like this: > > > > NameVirtualHosts x.94.149.9:80 > > > > > > ServerName www.whatever.com > > DocumentRoot /home/someuser/public_html > > > > > > > > ServerName www.whatever.net > > DocumentRoot /home/user/public_html > > > > > > > > ServerName www.whatelse.com > > DocumentRoot /home/some-user/public_html > > > > > > I cannot simply put and host on an IP basis; we're > > expecting to host in the neighborhood of 2-3 thousand websites, and we > > don't want to waste static IP's on those we don't have to. > > > > -- > > Nathan Vidican > > webmaster@wmptl.com > > Windsor Match Plate & Tool Ltd. > > http://www.wmptl.com/ > > > > > > 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