Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Sep 2007 08:52:25 -0400
From:      Rob <bitabyss@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Binding application to one ethernet interface
Message-ID:  <46FBA789.8090907@gmail.com>
In-Reply-To: <20070927112954.4F9E295959@s21sec.com>
References:  <20070927112954.4F9E295959@s21sec.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Eduardo Morras wrote:
>    I have a server with apache that serves pages to an intranet. Now we 
> want to add another server application (cvs and pgsql) to another 
> intranet. Of course we can buy a new server to do that, but i want to 
> know if i can add a new ethernet card to the current server and force 
> apache to serve to one intranet and cvs/pgsql to the other intranet.
>    I think that by default, freebsd will balance the charge between both 
> cards, is it true??

You don't need multiple NICs if it's all going on the same subnet or lan 
segment.  And, no, there is no "balancing" anyway.

You can assign extra alias IP addresses to the one NIC (rc.conf option). 
Then tell apache to only use one, with a "Listen" directive in its 
.conf.  You can also setup Apache to do "virtual hosts", so one Apache 
serves multiple web sites.  Google for that one - there are lots of 
tutorials out there.

The best thing is to probably do is config multiple addresses on the 
NIC, then run each server process in its own jail so they're isolated 
from each other.  There's a good WIkipedia article on FreeBSD jails I 
was reading just yesterday;  it links to a couple good tutorials.

    -Rob



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46FBA789.8090907>