AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 486564
Accepted
Wizzard
Wizzard
Asked: 2013-03-12 00:03:11 +0800 CST2013-03-12 00:03:11 +0800 CST 2013-03-12 00:03:11 +0800 CST

Apache other_vhosts_access.log 和 access.log 日志文件

  • 772

apache 访问日志出现了一个奇怪的问题。我正在收到一个写入网站的条目

/var/log/apache2/access.log

和

/var/log/apache2/other_vhosts/access.log

我正在使用 Debian 6,在 repo 中有最新的 Apache。当我查看文件时

/etc/apache2/conf.d/other-vhosts-access-log

它说

# Define an access log for VirtualHosts that don't define their own logfile
CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined

但是当我查看该站点的 VirtualHost 声明时,它有

    CustomLog ${APACHE_LOG_DIR}/access.log vhost_combined
</VirtualHost>

在文件的底部。所以我已经声明了日志文件,那么为什么 apache 仍然向 other_vhosts_access.log 写入一个条目?

最后,我注释掉了 apache/conf.d 文件中的行,但感觉这不是最好的方法。

我错过了什么?

linux
  • 2 2 个回答
  • 15071 Views

2 个回答

  • Voted
  1. Best Answer
    user9517
    2013-03-12T06:19:26+08:002013-03-12T06:19:26+08:00

    如果没有看到完整的 apache 配置,这很难诊断,但需要注意一些事项

    • 检查您是否没有在同一个虚拟主机中包含或定义第二个日志文件——这将导致重复记录。
    • 检查日志文件是否没有相互链接 -find /var/log/apache2 -samefile /var/log/apache2/access.log如果是这样,将同时列出它们。

    考虑这是一个错误的可能性。

    • 2
  2. Nikolaidis Fotis
    2013-03-12T01:42:51+08:002013-03-12T01:42:51+08:00

    试试

    CustomLog ${APACHE_LOG_DIR}/access.log 合并

    • 0

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve