Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如何记录对网站某个子目录的访问?_Apache_Logging_Traffic - Fatal编程技术网

Apache 如何记录对网站某个子目录的访问?

Apache 如何记录对网站某个子目录的访问?,apache,logging,traffic,Apache,Logging,Traffic,我有一个简单的apache服务器,默认安装在Digitalocean上。我可以在/var/log/apache2目录中查看对域的访问,但如何查看他们查看的子目录?如果这不是默认记录的内容,我应该如何设置它?服务器处理的所有请求都有一个日志文件 RHEL/Red Hat/CentOS/Fedora Linux Apache access文件位置为: /var/log/httpd/access_log /var/log/apache2/access.log /var/log/httpd-acce

我有一个简单的apache服务器,默认安装在Digitalocean上。我可以在/var/log/apache2目录中查看对域的访问,但如何查看他们查看的子目录?如果这不是默认记录的内容,我应该如何设置它?

服务器处理的所有请求都有一个日志文件

RHEL/Red Hat/CentOS/Fedora Linux Apache access文件位置为:

/var/log/httpd/access_log
/var/log/apache2/access.log
/var/log/httpd-access.log
Debian/Ubuntu Linux Apache访问日志文件位置为:

/var/log/httpd/access_log
/var/log/apache2/access.log
/var/log/httpd-access.log
FreeBSD Apache访问日志文件位置为:

/var/log/httpd/access_log
/var/log/apache2/access.log
/var/log/httpd-access.log
默认情况下,您可以在那里找到客户端用于访问服务器和浏览器用户代理的IP地址、时间、请求方法、URL

如果需要自定义日志文件,您可以始终访问-AccessLog