CentOS中Apache日志默认路径为:
/var/log/httpd/access_log/var/log/httpd/error_log查看方式:
sudo tail -f /var/log/httpd/access_log(访问日志)或 sudo tail -f /var/log/httpd/error_log(错误日志)。sudo less /var/log/httpd/access_log(支持上下翻页、搜索)。sudo grep "关键字" /var/log/httpd/access_log(替换为需查找的内容)。注意:若日志路径因虚拟主机配置不同,可通过命令 grep -R "Log" /etc/httpd/ 查找自定义路径。