在 CentOS 上,Apache(httpd)日志的默认存放位置如下:
/var/log/httpd/
/var/log/httpd/access_log
/var/log/httpd/error_log
如果你配置了虚拟主机(VirtualHost),日志可能在:
/var/log/httpd/example.com-access_log
/var/log/httpd/example.com-error_log
可能是配置文件改了路径,可以查看 Apache 配置:
grep -R "CustomLog" /etc/httpd/
grep -R "ErrorLog" /etc/httpd/
或者在主配置文件中:
/etc/httpd/conf/httpd.conf
systemctl status httpd
如果你是用 Nginx + Apache 或 CentOS 8+(可能用 php-fpm / remi),日志位置可能略有不同,可以告诉我你的系统版本和安装方式,我可以更精确地帮你查。