Apache Access日志文件位于何处(Mac Apache)?

我在网上做了一些阅读,我认为Apache访问日志包含发送到服务器的所有请求。 但是,我无法从网站收集这些信息是否实际存储在一个可访问的文本文件中,或者以其他方式存储。 如果它存储在一个文件中,这个文件在默认的Mac Apache安装位置在哪里?

在Apacheconfiguration文件中查找“CustomLog”和“ErrorLog”,这些文件位于/etc/apache2/httpd.conf

另请参阅http://httpd.apache.org/docs/current/logs.html上的文档

访问日志的默认位置是:

/var/log/apache2/access_log 

错误日志的默认位置是:

 /var/log/apache2/error_log 

RHEL / Red Hat / CentOS / Fedora Linux Apache错误文件位置 – / var / log / httpd / error_log
Debian / Ubuntu Linux Apache错误日志文件位置 – /var/log/apache2/error.log
FreeBSD的Apache错误日志文件位置 – /var/log/httpd-error.log
要find确切的apache日志文件位置,可以使用grep命令:

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