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.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net