Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The apache documentation states a DNS lookup will be performed when the Allow from (or Deny from) clause contains a domain name (e.g Allow from What if the domain name and IP is listed /etc/hosts?


share|improve this question
up vote 1 down vote accepted

Apache use nsswitch. If IP address in /etc/hosts then use /etc/hosts information.

Comment " localhost" in /etc/hosts:

16:48:41.505697 IP > 11646+ PTR? (40)
16:48:41.506336 IP > 11646 NXDomain* 0/1/0 (99)

Uncomment " localhost" in /etc/hosts:


but performance still decreases:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  0.88    0.028002          37       752           getsockname
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.