Binding application to one ethernet interface
Rob
bitabyss at gmail.com
Thu Sep 27 05:52:14 PDT 2007
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
More information about the freebsd-questions
mailing list