Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Sep 2001 19:29:03 -0700
From:      "Kulraj Gurm (bosa.ca Account)" <kulraj@bosa.ca>
To:        "Andy Myers" <andy@acmyers.com>, <freebsd-questions@freebsd.org>
Subject:   Re: Apache question
Message-ID:  <004201c134e9$5d6355e0$0ac8a8c0@kimsamy.com>
References:  <003101c134b4$d5053350$15fea8c0@heineken>

next in thread | previous in thread | raw e-mail | index | archive | help
Firstly, I'll assume you've taken care of DNS issues (which could alone
account for your problems).

If both domains are on the same IP then try :

NameVirtualHost 232.xxx.xxx.xxx

<VirtualHost 232.xxx.xxx.xxx>
         ServerAdmin sysadmin@domain1.com
         DocumentRoot /usr/local/www/domain2
         ServerName www.domain1.com
 </VirtualHost>

<VirtualHost 232.xxx.xxx.xxx>
         ServerAdmin sysadmin@domain2.com
         DocumentRoot /usr/local/www/domain2
         ServerName www.domain2.com
 </VirtualHost>


If you have more than one IP aliased on your NIC and you want to use unique
IP's for each domain the add a second NameVirtualHost line and edit the IP
address line accordingly

Hope this helps!

Kulraj



----- Original Message -----
From: "Andy Myers" <andy@acmyers.com>
To: <freebsd-questions@freebsd.org>
Sent: Monday, September 03, 2001 1:13 PM
Subject: Apache question


> Hello all.
>
> This is an Apache question, but I'm hoping someone here can answer it.
>
> I want my freebsd box to host another web site with a different domain
name.
> I set up virtual hosting in httpd.conf as instuction in the apache docs,
but
> when I try to bring up www.domain2.com in my browser, it always brings up
> www.domain1.com.
>
> www.domain1.com is the main site hosted by apache.  The virtual host
portion
> of my httpd.conf file is:
>
> NameVirtualHost *
>
> <VirtualHost www.domain2.com>
>         ServerAdmin sysadmin@domain2.com
>         DocumentRoot /usr/local/www/domain2
>         ServerName www.domain2.com
> </VirtualHost>
>
>
> Any ideas?  I must be missing something!
>
> Thanks much.
>
> Andy Myers
> Orlando, Florida USA
>
>
>
>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004201c134e9$5d6355e0$0ac8a8c0>