Where are Apache file access logs stored?
Ultimately, this depends on your Apache configuration. Look for
CustomLog directives in your Apache configuration, see the manual for examples.
A typical location for all log files is
/var/log and subdirectories. Try
/var/log/httpd/access.log. If the logs aren't there, try running
locate access.log access_log.
If you can't find the log with Gilles's answer, there are a couple more things you can try.
- Look in
sudo locate access.logas well as
sudo locate access_log. The logs on my system were not visible except to root, and the file was called
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 –
Debian / Ubuntu Linux Apache access log file location –
FreeBSD Apache access log file location –
To find exact apache log file location, you can use grep command:
# grep CustomLog /usr/local/etc/apache22/httpd.conf # grep CustomLog /etc/apache2/apache2.conf # grep CustomLog /etc/httpd/conf/httpd.conf
# a CustomLog directive (see below). #CustomLog "/var/log/httpd-access.log" common CustomLog "/var/log/httpd-access.log" combined