Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to enable HostnameLookups. I opened httpd.conf but couldn't find anyHostnameLookups. Do I need to add a line myself and what's the syntax?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Have a look at this link.

share|improve this answer
add comment

HostnameLookups is part of the core of apache so you just have to add the line in the configuration file.

Be careful though, the dns lookup on client IP is often slow and unreliable (a lot of IP address don't have a reverse record in the DNS).

share|improve this answer
add comment

What distribution are you using? If you're using Ubuntu, on a standard Apache install, you'll find it in /etc/apache2/apache2.conf:

# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
share|improve this answer
add comment

Your Answer

 
discard

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.