Apache/httpd log location

There are two type of apache httpd server log files:

Error Logs & Access Logs

Error Logs : All apache errors / diagnostic information other errors found while serving requests are logged to this file. Location of error log is set using ErrorLog directive. If there is any problem, you should first take a look at this file.

Default error log file location:

RHEL / Red Hat / CentOS / Fedora Linux Apache error file location – /var/log/httpd/error_log
Debian / Ubuntu Linux Apache error log file location – /var/log/apache2/error.log
FreeBSD Apache error log file location – /var/log/httpd-error.log

Access Logs : Apache server records all incoming requests and all requests processed to a log file. The format of the access log is highly configurable. The location and content of the access log are controlled by the CustomLog directive.

Default apache access log file location:

RHEL / Red Hat / CentOS / Fedora Linux Apache access file location – /var/log/httpd/access_log
Debian / Ubuntu Linux Apache access log file location – /var/log/apache2/access.log
FreeBSD Apache access log file location – /var/log/httpd-access.log

For custom log location we can make changes in below configuration files depending on OS

 # /usr/local/etc/apache22/httpd.conf
 # /etc/apache2/apache2.conf
 # /etc/httpd/conf/httpd.conf