Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

/etc/hosts

Discussion in 'General Discussion' started by ehsan, Jan 31, 2002.

  1. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    316
    what should i have inside /etc/hosts


    i have just this line :
    xx.xx.xx.xx (ip) mydomain.mydomain.com (server )

    apache failed, Bind failed, MySql,proftpd..
    :mad:

    Attempting to restart httpd
    Looking up localhost localhost Unable to locate remote host localhost. Alert!: Unable to connect to remote host. lynx: Can\'t access startfile http://localhost/server-status httpd status httpd did not return a status report
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. bdraco

    bdraco Guest

    You should have

    hostname = the result of the hostname command
    shorthostname = everything before the first . in the hostname


    xxx.xxx.xxx.xxx(ip of server) hostname shorthostname
    127.0.0.1 localhost localhost.localdomain
     
  3. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    Spain
    Is it
    127.0.0.1 localhost localhost.localdomain
    or
    127.0.0.1 localhost.localdomain localhost
    ?

    Does it matter?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. bdraco

    bdraco Guest

    [quote:5bb7d0e794][i:5bb7d0e794]Originally posted by Juanra[/i:5bb7d0e794]
    Is it
    127.0.0.1 localhost localhost.localdomain
    or
    127.0.0.1 localhost.localdomain localhost
    ?

    Does it matter? [/quote:5bb7d0e794]
    Doesn\'t matter...
     
  5. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    316
    Thanks,
    Apache comes up now,
    but dns does not yet
    which files should i check for DNS ?
    i\'ve checked /var/named , /usr/local/apache/conf/httpd.conf...
    they seems to looks good, what else should i check ?

    thanks again
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. jumpdomain

    jumpdomain Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    316
    Check the /etc/resolv.conf file

    Also, check the /var/log/messages file right after you try to start Bind to see what errors if any are produced.
     
  7. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    316
    inside /etc/resolve.conf ->
    nameserver xxx.xxx.xxx.xxx (IP)


    --> Restarting BIND :
    Feb 1 01:15:49 xxx-host named: named shutdown failed
    Feb 1 01:15:49 xxx-host named: named shutdown failed
    Feb 1 01:15:49 xxx-host named[4509]: starting BIND 9.1.3 -u named
    Feb 1 01:15:49 xxx-host named[4509]: using 1 CPU
    Feb 1 01:15:49 xxx-host named[4512]: loading configuration from \'/etc/named.conf\'
    Feb 1 01:15:49 xxx-host named[4512]: zone configuration for \'.\' failed: file not found
    Feb 1 01:15:49 xxx-host named[4512]: loading configuration: failure
    Feb 1 01:15:49 xxx-host named[4512]: exiting (due to fatal error)
    Feb 1 01:15:49 xxx-host named: named startup failed
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    316
    Hey Hey,
    I\'ve removed this from /etc/named.conf
    and now bind is up and working fine.
    what is this for ? ->

    zone \".\" {
    type hint;
    file \"named.ca\"
    };

    coool :> thank you every body :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice