gpt4 book ai didi

apache - 虚拟主机的错误不会写入指定的 ErrorLog,而是写入默认的 error_log

转载 作者:行者123 更新时间:2023-12-04 21:40:16 25 4
gpt4 key购买 nike

我已在 Debian 7 VM 上升级到 Apache 2.2.22。我刚刚使用 apt-get 安装了它,除了添加我的 VirtualHost 之外没有进行任何配置更改

<VirtualHost *:8001 *:80>
ServerName devintegration.ie
ServerAlias devintegration.ie
DocumentRoot /sites/integration/development/docs
ScriptAlias /console/ /sites/integration/development/console/
ErrorLog /sites/logs/devintegration.ie-error_log
CustomLog /sites/logs/devintegration.ie-access_log common
</VirtualHost>

我习惯的行为是任何 Perl 错误或警告都出现在虚拟主机中指定的错误日志中。我现在得到的行为是 Perl 错误转到/var/log/apache2 目录中的常见 Apache 日志,而虚拟主机日志只包含“脚本头的过早结束”。

我已经对此进行了一些谷歌搜索,但大多数结果都是关于 mod_perl。我确实找到了这个页面,最后一条评论表明它的工作方式发生了变化,但没有提供关于是否可以更改的信息。 Apache Log Forum “任何由 CGI 脚本写入 stderr 的信息都将直接复制到错误日志中。”

有没有办法配置 apache 来引导 Perl 错误并警告虚拟主机中指定的错误日志?

我使用的以前的 Apache 版本是 2.2.15。

最佳答案

这是(曾经?)a longstanding bugmod_cgid .它的状态仍然是“稍后解决”,这(显然)意味着:“停止提示 - 我们将在以后的版本中这样做,而不是现在”。也许它现在已经解决了(你的版本,2.2.22,已经 3 岁了),但我找不到任何提及它。
mod_cgid是默认值 .cgi Apache 线程版本中的处理程序。如果切换到 mod_cgi ,例如通过使用可以解决您的问题的非线程 apache(就像我一样)。

关于apache - 虚拟主机的错误不会写入指定的 ErrorLog,而是写入默认的 error_log,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28450175/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com