[CentOS] /etc/hosts not resolving hostnames

Fri Apr 8 20:55:46 UTC 2011
Kai Schaetzl <maillists at conactive.com>

Johan Martinez wrote on Fri, 8 Apr 2011 14:31:32 -0500:

> This is working fine on another CentOS system.

It doesn't matter if "it works fine". The host command indeed does dns 
lookups as John Pierce already pointed out and apache does, too. With your 
experience level I suggest believing him. It's working on your other 
system because that hostname is in the resolver cache or can be resolved.
You want to use DNS, anyway.
For your apache problem: you want to read up on name-based virtual hosts.

Kai