/etc/hosts.conf should be something like:
Make sure this is the case
As for why localhost isn't coming up, try fixing host.conf to show this, rather than what you have:
WHMCS Guru - WHMCS addons, management, support and more. WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
Linux Problems? WHMCS Issues? +1-866-546-8914 (linux-14) or @whmcsguru on twitter!