在 CentOS 上,Apache(通常是 httpd)的日志默认存放位置如下:
/var/log/httpd/
/var/log/httpd/access_log
/var/log/httpd/error_log
如果你配置了虚拟主机(VirtualHost),日志可能在:
/var/log/httpd/域名-access_log
/var/log/httpd/域名-error_log
日志路径由 Apache 配置文件决定,可查看:
grep -R "CustomLog" /etc/httpd/
grep -R "ErrorLog" /etc/httpd/
常见配置文件:
/etc/httpd/conf/httpd.conf/etc/httpd/conf.d/*.confhttpd/var/log/httpd//usr/local/apache/logs/
如果你愿意,可以告诉我:
我可以帮你更精确地定位日志。