Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2001 23:36:19 -0400
From:      Paul Khavkine <paul@colba.net>
To:        freebsd-isp@freebsd.org
Subject:   Re: Virtual Apache and DNS
Message-ID:  <3B81D733.C5894843@colba.net>
References:  <NDBBJCFGBCLFCNJCCJPDKEDJCDAA.john@hei.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Well for DNS i usually do the same:

somehost.com 3600      IN      SOA     somehost.com. root.somehost.net. (
                                                       2001081901
                                                      1800
                                                      900
                                                      604800
                                                      3600 )
                3600    IN      A       xxx.xxx.xxx.xxx
www     3600    IN      A       xxx.xxx.xxx.xxx

for httpd.conf:

NameVirtualHost 1.2.3.4

<VirtualHost 1.2.3.4:80>
  ServerName somehost.com
  ServerAlias *.somehost.com
  blahh...
</VirtualHost>

Cheers
Paul


"John A. Hengstler" wrote:

> Greetings,
>
> What is the generally accepted way of handling the following in named and
> apache:
> Where www.somehost.com and somehost.com get to the same pages.    Should
> there be 2 VirtualHost entries in httpd.conf and dns as follows, or 1 in
> httpd.conf (www.somehost.com) and dns set differently?
>
> It works as is, but seems to me that their should only be 1 entry in
> httpd.conf
>
> Suggestions appreciated.
>
> John Hengstler
>
> httpd.conf:
>
> #       www.somehost.com
> #       somehost.com
>
>         NameVirtualHost *
>         <VirtualHost *>
>         ServerName www.somehost.com
>         </VirtualHost>
>         <VirtualHost *>
>         ServerName somehost.com
>         </VirtualHost>
>
> named file:
>
> $ORIGIN com.
> somehost.com 3600      IN      SOA     somehost.com. root.somehost.net. (
>                 2001081901 1800 900 604800 3600 )
>         3600    IN      A       xxx.xxx.xxx.xxx
> $ORIGIN somehost.com.
> www     3600    IN      A       xxx.xxx.xxx.xxx
> ftp     3600    IN      A       xxx.xxx.xxx.xxx
> smtp     3600    IN      A      xxx.xxx.xxx.xxx
> pop3     3600    IN      A      xxx.xxx.xxx.xxx
> mail     3600    IN      A      xxx.xxx.xxx.xxx
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message

--
*************************************************
Paul Khavkine
Network Administrator
Distributel Communications
740 Notre Dame West, Suite 1135
Montreal, Quebec, Canada, H3C 3X6
1-514-877-0064




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?3B81D733.C5894843>