single box handling multiple ips, how?

Ken Hawkins ken at
Wed Feb 9 12:33:22 PST 2005


I do not know what the '' is about, more specifically he 
.net"." (dot on the end). i took this for the initial setup that was 
done on the box' initial entry in the /etc/hosts.

ok what am i doing...

I have apache running on the box and would like to use 3 diffferent 
IP's to try and keep (somewhat separate) the traffic, logging, etc. for 
the Virtual Hosts that are running there.

ultimately I will have;

<ip address 1> resolve to -> website 1
<ip address 2> resolve to -> website 2
<ip address 3> resolve to -> website 3

obviously they will bind to the same box but i would like to have them 
to separate ip's to ease some maintenance on the box, redirect traffic 
when needed, blah, blah.

I know that I can Name more than one VirtualHost ie;
NameVirtualHost ???.???.???.151:80
NameVirtualHost ???.???.???.152:80
NameVirtualHost ???.???.???.153:80

and then the normal VirtualHost directive via IP's but I want to make 
sure that the box will answer to those ip's when we flip the DNS 

am i making sense? did i leave anything beyond the bind directive's out?


On Feb 9, 2005, at 1:57 PM, Lowell Gilbert wrote:

> Ken Hawkins <ken at> writes:
>> Sorry if this is not quite the place to ask however, if it is not can
>> someone point me toward the right resource (on the net) for answers. I
>> am
>> running FreeBSD on a box with an ethernet;
>> ifconfig
>>          inet ???.???.???.151 netmask 0xffff0000 broadcast 
>>          inet6 fe80::230:48ff:fe2c:76e2%em0 prefixlen 64 scopeid 0x1
>>          inet ???.???.???.152 netmask 0xffffffff broadcast
>>          inet ???.???.???.153 netmask 0xffffffff broadcast
>>          ether 00:30:48:2c:76:e2
>>          media: Ethernet 100baseTX <full-duplex>
>>          status: active
>> the <???> are just our ips. you will notice that .152 and .153 are
>> aliases
>> and are mapped to external ips via a switch. my question is how can I
>> resolve names to the ip aliases on the box? ie
>> ???.???.???.152 ->
>> and
>> ???.???.???.153 ->
>> is this a /etc/hosts kind of entry?
>> ???.???.???.152 web1
>> ???.???.???.152
>> ???.???.???.153 web1
>> ???.???.???.153
>> any help would be greatly appreciated!
> Yes, /etc/hosts will be the place to put those translations (for the
> full hostnames -- you don't want the "" entries) if you
> want that machine to know about them.  If you explained the desired end
> result, we might be able to give you more help.
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list