溫馨提示×

CentOS中Apache日志在哪查看

小樊
33
2025-08-30 19:25:48
欄目: 智能運維

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/ 查找自定義路徑。

0
亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女