Apache web server, which also commonly known as httpd process, has the ability to log comprehensive and detailed activity, performance and eror information about its operation. Apache logging capabilities allow webmaster to effectively manage a web server, analyze traffic statistics, and troubleshooting the errors that may occurred.

Some system administrators may not requires the logs written and stored by Apache web server, either because seldom drill down into the log files, or the logs have grown too big and too large to be meaningful analyzed and studied. In the case, it’s possible to disable Apache log. Besides, some webmasters who want to optimize site speed by making HTTP serving by Apache faster also opt to disable and turn off Apache logging or log generation capabilities. Although Apache keeps its log files open so that writing information to the log files is blisteringly fast, but the writing log information process still take up a few processor power and hard disk activity, which slow down server speed, especially on busy server.

In order to disable and turn off the Apache logging, just comment out the log lines in the Apache configuration file, httpd.conf, which normally located in /etc/httpd/conf, /etc/apache/conf, /etc/apache2/conf, \usr\local\apache\conf or \usr\local\apache2\conf directory.

In httpd.conf, the logging is defined by a CustomLog directive for access logs and an ErrorLog directive for error logs. For example,

CustomLog /usr/local/apache/logs/access_log common
ErrorLog “logs/error_log”

Commenting out the line by adding # (hash, pound or number sign) to the front of the line. To disable logging of access log, comment the line of CustomeLog, and likewise, comment the line of ErrorLog to disable logging of error log. Restart the Apache web server for the change to take effect.

Note: CustomLog and ErrorLog are also been defined within VirtualHost declaration too for logging the activity of particular virtual host. Disabling logging for virtual hosts only may cause the log information been written to main Apache log files.