在 CentOS 上,Apache(通常是 httpd)的**访问日志(access log)**默认位置如下:
/var/log/httpd/access_log
/var/log/httpd/error_log
访问日志可能在对应配置中自定义,例如:
/var/log/httpd/xxx-access_log
查看虚拟主机配置:
grep -R "CustomLog" /etc/httpd/
tail -f /var/log/httpd/access_log
/usr/local/apache2/logs/access_log
docker logs <容器名>
如果你用的是 CentOS 8 / Stream 且 Apache 来自 dnf,路径同样是 /var/log/httpd/。
需要我帮你分析某一条访问日志格式或排查问题吗?