Apache logs & reverse IP address lookup
Hello,
A few days ago, I noticed that my apache logs had domain names instead of IP addresses, for example:
How can I disable this feature and instead force it to log IP addresses only? Thank you.
msnbot-157-55-39-11.search.msn.com - - [08/Apr/2015:01:07:39 +0100] "GET /file.html HTTP/1.1" 200 53540 "-" "Mozilla/5.0 (compat
ible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
How can I disable this feature and instead force it to log IP addresses only? Thank you.
-
To answer my own problem: Apparently when the .htaccess contains a rule that performs a reverse DNS lookup, it forces the Apache logs to store the hostname instead of the IP address. Even if "HostnameLookups" is set to "Off" in the configuration. Bug or feature? who knows... 0 -
Bug or feature? who knows...
Hello, This is normal behavior with the default Apache configuration. You would have to disable AllowOverride for this VirtualHost to prevent the user from making that change in their .htaccess file. Thank you.0
Please sign in to leave a comment.
Comments
2 comments