by Mikayel Vardanyan | Aug 30, 2006
Better performance of Apache web server can be attained by fine tuning its parameters in the configuration file (httpd.conf), located at in apache_dir/conf/. One of the parameters that should be considered is HostnameLookups. By configuring this parameter the user can customize the output format of the log file. By default Apache logs all requests in access.log file located in apache_dir/etc/. If HostnameLookups parameter is set to on, Apache will resolve the hostnames of the originated requests.
Prior to Apache 1.3 HostnameLookups parameter was set to on by default, which added an additional latency to every request. In Apache 1.3 and higher, this parameter is set off by default, so the log file contains the IP of requests, but not their host names. In case you need to resolve IP addresses to hostnames in the logfiles, you can use logresolve program that comes with Apache, or any other third party tools available. We also recommend doing the post processing of log files on some machine other than the production server, in order to avoid any server performance issues.
Additional info regarding the HostnameLookups parameter and other Apache performance tips can be found at:
https://httpd.apache.org/docs/1.3/misc/perf-tuning.html#runtime
Category: Articles | Tagged No Comments.