6

I did a little reading online, and I think that the Apache Access Log contains all of the requests sent to the server. However, I couldn't gather from the websites whether this is actually stored in an accessible text file, or in some other manner. If it is stored in a file, where is this file on the default Mac Apache install?

Sven
  • 98,649
  • 14
  • 180
  • 226
Josh Sherick
  • 219
  • 1
  • 3
  • 8
  • Let's have a look on your apache conf, for me at "/etc/apache2/httpd.conf" under 'ERROR_LOG' section, for me it set by default to '/private/var/log/apache2/error_log' May this Help, Have a nice day buddy – Jean-Luc Barat Jul 09 '21 at 09:48

3 Answers3

11

The default location for the access log is:

/var/log/apache2/access_log 

The default location for the error log is:

/var/log/apache2/error_log
Hyppy
  • 15,608
  • 1
  • 38
  • 59
Sven
  • 98,649
  • 14
  • 180
  • 226
7

Look for 'CustomLog' and 'ErrorLog' in your Apache configuration files, which are under /etc/apache2/httpd.conf

Also see the documentation, at http://httpd.apache.org/docs/current/logs.html

Stefan Lasiewski
  • 23,667
  • 41
  • 132
  • 186
-1

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
To find exact apache log file location, you can use grep command:

# grep ErrorLog /usr/local/etc/apache22/httpd.conf
# grep ErrorLog /etc/apache2/apache2.conf
# grep ErrorLog /etc/httpd/conf/httpd.conf
sysadmin1138
  • 133,124
  • 18
  • 176
  • 300