hostname, main domain seems to
cause much confusion in general.
some of the servers I have, are initially
set up with some default nonsense,
usually the result of me completing an
orderform, and being asked for a hostname.
If I put s10.blogs.com, then when I first
log into DA, under admin settings, I see
hostname: s10.blogs.com
and nameservers ns{1,2}.blogs.com.
but at that time, I can safely ignore that
and move on to other stuff, and maybe
change it later (more below..)
if this was indeed my only server, or was
setting this up as completely independent,
and wanted to host a site called xhosting.com,
a domain which I maybe owned, then
i'd like the IP address on my external
interface to be that for blah.xhosting.com, and
of course I'd need 2 nameservers.
Easiest way would perhaps be (as I have
done) create a reseller package, then
create a reseller who's domain was
xhosting.com, with 3IPs used.
then I'd pop off to my registrar and use
the IPs DA assigned for the nameservers
to create ns{1,2} over there.
if the IP used for xhosting.com wasn't the one
on my interface, then i'd add an A record
for blah.hosting.com using that one.
I'd pop over to admin setting, and add
the hostname (blah...) and the two
new nameservers (names only).
Then I'd run the hostname script:
./hostname.sh blah.xhosting.com 1.2.3.4
(or whatevr the IP was).
i could also run the /etc/namedb/make-localhost
script, to produce to correct local reverse
zones (no doubt most people don't).
Any new users set up will use these nameservers.
I'd like to set up rDNS for this hostname,
so either the DC has given me permissions
to do this, or I can ask them nicely.
I've a few servers from NAC. Now they
do set up the hostname chosen by
themselves at install. (200000 + the number
of the server installed, I think) i.e.
$ hostname
221008.ds.nac.net
and they've set up rDNS for this also,
and bound this IP to the external interface,
and set this up in DA. mostly I leave this
as it is, why bother...
I could add a 'main domain' as above,
as a reseller's domain, and if I use this
reseller to create all users, the user will
be assigned the reseller's nameservers
to use, probably good enough for most people.
sending mail, using exim, for example
will use the primary_hostname set up,
and unless something else is done,
the IP set as From will be that on the
external interface, of course. Some may
not like seeing From 221008.ds.nac.net
and in that case may try to fiddle around
setting up their own hostname. But the IP
set by NAC for this you'd no doubt have
any control over, and have to ask for
changes wrt rDNS etc. Other providers
may do the same.
At Leaseweb (amsterdam) and coreix (UK)
where I've other servers, it's just the
dummy entries they've used at setup,
and these can safely be changed as you like.
So always a good idea to maybe check
how the provider has the box set up at
install, and think about really needing to
change anything at all wrt hostname.
the document root for the server IP,
Iand the one used for DA whichmay differ)
is indeed /var/www/html/
isn't really a 'main domain', and going to
http://1.2.3.4/
or whatever the IP is you have, will just
serve up one of the index pages from the
/var/www/html/ directory on the box.