[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hostname question

www.givemefish.com wrote: 
> *) Should I use the static IP assigned by my ISP or on the router?  Or
> is the above correct?
The router should have the IP address from your ISP, it will forward
requests to your server as per your port forwarding rules.
The server doesn't exist on the internet as such, it is on your
internal network. Any external hosts on the internet that want to
connect to it will connect to your router, which decides which host on
your internal network they really want to connect to. I'd suggest a
brief look at Network Address Translation, since this is what lets the
router work like this.

> *) Can / should the local domain name (used in /etc/hosts) be
> different from the domain name of the website(s) that I am hosting?
> ie, using MyLocalDomainName rather than domainname I have registered
> for my website.
It can, and there's no technical reason for it to be either the same or
I'd suggest a reading of the Apache2 docs on Virtual Hosts, they're
quite good: http://httpd.apache.org/docs/2.0/vhosts/
Assuming, that is, you're using Apache2.x, though the configuration is
much the same for 1.3, from what I can recall.

> If I should use the registered domain name, how do I handle hosting
> multiple domains on this server?  Which domain name would I use?
> *) How does this differ from what is saved in /etc/hostname?  What if
> these values differ?  Who uses /etc/hostname?

/etc/hosts is used by the OS for name resolution in the absence of
DNS (though when it exits it takes precedence). As far as I'm
aware, /etc/hostname is part of the same system.
You should use name VirtualHosts to allow Apache to handle hosting
multiple domains on the same server. The value of /etc/hostname just
allows the box to intercept connections to itself without them having
to go to the DNS server.

> *) My current /etc/hostname contains the single line:
> MyLocalHostName.MyLocalDomainName
> Is that correct?

That's of the correct form. Whether the data is correct or not depends
on the configuration of your network.
Who runs the network (and more pertinently the DNS server)? They should
have told you what your local hostname and domain are.

Avi Greenbury

Reply to: