hostnames and interfaces
jerrymc at clunix.cl.msu.edu
Fri Nov 21 07:35:52 PST 2003
> On Thu, 20 Nov 2003 20:42:33 -0500
> Marty Landman <MLandman at face2interface.com> granted us these pearls of wisdom:
> > At 08:17 PM 11/20/2003, paul van den bergen wrote:
> > >to expand on this, there is a potential many to many relationship here
> > >between
> > >host names and IP addresses (strickly speaking that is what dns etc sees?)
> > >
> > >how dose BSD define this? how does one define this using BSD?
> > Hey, sounds like you understand things so well you see the void in the
> > forest. As a newbie I'm still just trying to keep my head from twisting off
> > at long enough intervals to define some of the questions. Like, given I
> > have 5 boxes - 1 fbsd 4 windoz though maybe that proportion will change in
> > a time :) - and each has their own ip adr and I have two apaches installed
> > does that mean I can setup a max of 5 different domain level websites on my
> > intranet? Or 10? Or infinite (well, this is reality I hope so...)
> > The daemons are afoot, my ponderings do not affect them.
> Let me see if I can shed some light on this issue for you. To the best
> of my knowledge a FBSD system can have only one hostname however it can
> have as many aliases as you wish. The setup of aliases is acheived via
> DNS rather than assigning hostnames per interface. Where you have
> multiple machines you would assign multiple hostnames whether they be
> from different domains or not.
> $ host mail.meibin.net
> mail.meibin.net is a nickname for kyoto.meibin.net
> kyoto.meibin.net has address 126.96.36.199
> per the above the actual host name for the system is kyoto, it's FQDN is
> kyoto.meibin.net and it has the alias of mail.meibin.net rather than the
> host name of mail.meibin.net .
> Apache and loads of other software support virtual hosting and defining
> a name in an apache configuration has little to do with the actual
> underlying system hostname. That being said virtual hosts don't work
> well if DNS was not set correctly for them.
You can also configure your NIC to answer to multiple IP addresses
and then configure your Apache to treat each as a virtual host with
a separate hostname/URL. Yes, you have to have whoever is serving
DNS for you (either yourself, your ISP or some DNS service) set up
to translate IP <-> hostname and if it involves a new Domain name,
you have to register it with the appropriate registering agency.
Most of our sites use a separate IP for each virtual host for
various reasons. But, you can also have multiple aliases per
IP address as the poster indicates.
More information about the freebsd-questions