Date: Thu, 5 Oct 2000 10:46:25 -0700 (PDT) From: Presence <presence@irev.net> To: freebsd-isp@FreeBSD.ORG Subject: Re: Apache vhosts question Message-ID: <Pine.BSF.4.21.0010051028310.3759-100000@irev.net> In-Reply-To: <Pine.BSF.4.21.0010051318510.8680-100000@shell1.thebiz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
<VirtualHost 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
</VirtualHost>
<VirtualHost 63.101.244.233>
# 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
</VirtualHost>
<VirtualHost 63.101.244.233>
# 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
</VirtualHost>
So what I'm doing (successfully) is the one line for the NameVirtualHost,
then each <VirtualHost> 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 <VirtualHost> block, Apache defaults to the first
<VirtualHost> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0010051028310.3759-100000>
