Results 1 to 2 of 2
  1. #1

    A question regarding etc/hosts

    It is said in Linode's doc that:
    Update /etc/hosts
    Next, edit your /etc/hosts file to resemble the following example, replacing "plato" with your chosen hostname, "example.com" with your system's domain name, and "12.34.56.78" with your system's IP address. As with the hostname, the domain name part of your FQDN does not necesarily need to have any relationship to websites or other services hosted on the server (although it may if you wish). As an example, you might host "www.something.com" on your server, but the system's FQDN might be "mars.somethingelse.com."
    File:/etc/hosts

    Code:
    127.0.0.1        localhost.localdomain    localhost
    12.34.56.78      plato.example.com        plato
    Since it says "the domain name part of your FQDN does not necesarily need to have any relationship to websites or other services hosted on the server", does that mean I can use "plato.somenonexistdomain.com" on the second line?

    Does that mean, only the first IP part and the last hostname part is need to be true?
    -none-

  2. #2
    Join Date
    Apr 2011
    Posts
    231
    My knowledge is a little rusty, but yes, you can put anything there in the /etc/hosts file.

    Example:
    --------

    127.0.0.1 localhost.localdomain localhost
    xx.xx.xx.xx server1.yourdomain.com server1
    yy.yy.yy.yy server2.anotherdomain.com server2


    xx.xx.xx.xx is the IP addr. of your VPS - and the FQDN (server1.yourdomain.com) should come first before 'server1'

    Subsequent entries (e.g. another IP addr: yy.yy.yy.yy correspond with another domain - yy.yy.yy.yy can be another IP on the same VPS or another server on the internet).

    Once you've edited the /etc/hosts, you may need to restart named or nsd3

Similar Threads

  1. /etc/hosts Question
    By paulg1981 in forum VPS Hosting
    Replies: 2
    Last Post: 01-14-2008, 12:18 AM
  2. Question to Hosts
    By Bling Bling in forum Running a Web Hosting Business
    Replies: 2
    Last Post: 08-07-2003, 02:40 PM
  3. Question to Hosts
    By DarktidesNET in forum Web Hosting
    Replies: 3
    Last Post: 01-11-2003, 02:41 PM
  4. question for hosts
    By KG in forum Web Hosting
    Replies: 13
    Last Post: 07-19-2001, 11:05 PM
  5. A question to all the hosts here....
    By venomx in forum Web Hosting
    Replies: 3
    Last Post: 05-25-2001, 09:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •