Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Dec 1999 09:34:52 -0600
From:      Tony Wells <awells@journalstar.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Virtual hosts
Message-ID:  <384FCC1C.553F394C@journalstar.com>
References:  <NDBBJGEMJKEAIMPCIIDOEECJCAAA.jonkman@bussert.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The NameVirtualHost is for hosts that all exist on the same IP, where
the server looks at the header sent by the browser to determine which is
the correct virtual host to serve the page.

I assume you want unique IP's for each of your servers so use the
VirtualHost directive.  Each VirtualHost should have a unique IP.  Make
sure you have a Listen directive for each of your IP's so Apache will
know to connect to those IP's.  You'll need something like: Listen
xxx.xxx.76.131:80 for each VirtualHost.

Can you ping the aliases that you set up using ifconfig?  If not try
setting up your aliases using a netmask of 255.255.255.255.

Matthew Jonkman wrote:
> 
> I'm trying to set up apache with the frontpage extensions and use virtual
> hosts. I've set up the http.conf with
> 
> <VirtualHost MY IP ADDRESS>
>     ServerAdmin jonkman@bussert.com
>     DocumentRoot /usr/local/www/data/132/
>     ServerName MY DOMAIN NAME
>     ErrorLog logs/132-error_log
>     CustomLog logs/132-access_log common
> </VirtualHost>
> 
> for each IP and rc.conf uses
> 
> ifconfig_mx0="inet xxx.xxx.76.130 netmask 255.255.255.248"
> ifconfig_mx0_alias="inet xxx.xxx.76.131 netmask 255.255.255.248"
> ifconfig_mx0_alias="inet xxx.xxx.76.132 netmask 255.255.255.248"
> 
> and so on for all 10 virtual hosts I need.  Apache won't start and says it
> the virtual hosts overlap eachother, perhaps I need a NameVirtualHost
> directive.
> 
> So I do the NameVirtualHost like so...
> 
> NameVirtualHost xxx.xxx.76.130:80
> NameVirtualHost xxx.xxx.76.131:80
> NameVirtualHost xxx.xxx.76.132:80
> 
> and I apache won;t start and gives me
> 
> [Sun Dec  5 23:36:04 1999] [warn] NameVirtualHost xxx.xxx.76.130:80 has no
> VirtualHosts
> [Sun Dec  5 23:36:04 1999] [warn] NameVirtualHost xxx.xxx.76.130:80 has no
> VirtualHosts
> [Sun Dec  5 23:36:04 1999] [warn] NameVirtualHost xxx.xxx.76.130:80 has no
> VirtualHosts
> 
> for all my IP's.
> 
> I seem to think it may be related to the alias and all the IP's being on a
> single interface, but I don;t know a different way to do it. Can anyone
> help? Please!
> 
> Thanks
> 
> Matthew Jonkman
> Bussert Consulting
> 
> 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?384FCC1C.553F394C>