CentOS下Apache日志默认存放在/var/log/httpd/目录,主要日志文件及查看方式如下:
/var/log/httpd/access_log,记录客户端访问信息,可用tail -f实时查看、grep搜索关键词。/var/log/httpd/error_log,记录服务器错误信息,查看方式同访问日志。其他说明:
/etc/httpd/conf/httpd.conf)中自定义了日志路径,需以配置文件为准。less分页查看、cat直接显示全部内容(大文件慎用)。