Home > Articles > Networking > Network Administration & Management

This chapter is from the book

This chapter is from the book

Controlling IP Address Resolution

   HostNameLookups on

If you set the HostNameLookups directive to on then Apache will try to determine (resolve) the hostname corresponding to the client's IP-address when it logs the request.

With HostNameLookups set to off, an access_log entry may look like

192.168.200.4 – someuser [12/Jun/2005:08:33:34
     +0500] "GET /example.png HTTP/1.0" 200 1234

And with HostNameLookups set to on, the same entry would look like

unit12.example.com - someuser [12/Jun/2005:08:33:34
     +0500] "GET /example.png HTTP/1.0" 200 1234

The next section explains the reverse process, how to replace IP addresses in logs with hostnames.

  • + Share This
  • 🔖 Save To Your Account