This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all. I'm fairly green (I suppose that's evident by my post topic), however, I'm setting up RedHat 9 on a machine to use as a server to host a web site for personal use/learning, using the www address I have registered. My question is, what do I enter for the Hostname configuration when prompted during the installation? Is it www.mysite.com or just mysite.com (or something else)? Any help and advice would be greatly appreciated.
Your hostname can be anything you like. If this is just a local box, name it according to how you want to access it. However, if this box is on a network with a DNS server, then you can name it whatever you want.
For instance, my server is named "tookie". However, in DNS, it's "www.snaghosting.com" and "www.cleancode.org". If you log onto that box and run 'uname -h', you'll get back "tookie". Because that's its local name. Everyone using DNS to resolve the host name www.cleancode.org will get the IP of tookie back.
So, if you're setting up a little web server just for your own use, name the box what you want to. You can add extra entries in the /etc/hosts file to accomidate what you want to access your web server with. For instance:
Then you can pull up your web browser and type in any one of those names and your web page will pull up from your local box.
If you're wanting other people to access this box over the internet and they will be accessing it via www.mysite.com, then who ever you registered your domain name with, you'll need to go there and assign that domain name with your IP address. The, you can still call your box whatever you want. However, the people accessing it from over the internet will be hitting it by whatever you assigned in DNS.
Joined: Dec 12, 2003
I really appreciate your feedback; you totally cleared that up (localhost vs. DNS). I do want to allow access to the site over the internet, so DNS is the direction I'm going, which leads me to the following:
I have a book (Linux Administration Beginner's Guide) which is pretty lean on the DNS material, however, it mentions using BIND. Is this the way to go for DNS, or is there something else I should be looking into? How can I check if DNS functionality is already installed on my machine (Red Hat 9)? Can you recommend any good reference material/sites that explain how to set up and configure DNS on Red Hat?
Okay, let me see if I understand this correctly; I'd have to set up DNS if my server was managing an intranet with servers below it (subdomains?!?!)? However, for my purposes (setting up a single server with the sole purpose of hosting a web site that can be accessed by others over the internet) DNS is not necessary?
Also, on the point of the domain name, is there a difference between naming the domain www.mysite.com or mysite.com, and which method is prefered/better?
Thanks again; I really appreciate the feedback I've gotten. Best regards. David.