虚拟主机的错误不会写入指定的ErrorLog,但会写入默认的error_log [英] Errors for virtual host are not written to specified ErrorLog, but to default error_log

查看:165
本文介绍了虚拟主机的错误不会写入指定的ErrorLog,但会写入默认的error_log的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have upgraded to Apache 2.2.22 on a Debian 7 VM. I have just installed it using apt-get and not made any config changes except to add my 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日志,而虚拟主机日志仅包含脚本头的过早结尾".

The behavior I was used to was that any Perl errors or warns appeared in the error log specified in the virtual host. The behavior I'm now getting is that the Perl errors go to the common Apache log in /var/log/apache2 directory and the virtual host log just contains "Premature end of script headers".

我已经对此进行了一些搜索,但是大多数结果都是关于mod_perl的.我确实找到了该页面,最后的评论表明它的工作方式有所变化,但是没有提供有关是否可以更改的信息. Apache日志论坛通过CGI脚本写入stderr的任何信息都将被直接复制到错误日志."

I've done some googling on this but most of the results are about mod_perl. I did find this page and the last comment suggests that there was a change to how this works but no information was given as to whether it could be changed. Apache Log Forum "Any information written to stderr by a CGI script will be copied directly to the error log."

是否可以配置apache来引导Perl错误并警告虚拟主机中指定的错误日志?

Is there a way to configure apache to direct Perl errors and warns to the error log specified in virtual host?

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

The previous Apache version I was using was 2.2.15.

推荐答案

这是(was?) mod_cgid中的一个长期存在的错误.它的状态仍然是"RESOLVED LATER"(显然),它的意思是:停止抱怨-我们将在以后的版本中进行操作,而不是现在".也许到现在为止已经解决了(您的版本2.2.22已有3年的历史了),但是我找不到任何提及.

This is (was?) a longstanding bug in mod_cgid. Its status still is "RESOLVED LATER" which (apparently) means: "stop complaining - we'll do it in a later version, not now". Maybe it has been solved by now (your version, 2.2.22, is 3 years old), but I couldn't find any mention of it.

mod_cgid是Apache线程版本中的默认.cgi处理程序.如果您切换到mod_cgi,例如通过使用可以解决您问题的非线程Apache(如我一样).

mod_cgid is the default .cgi handler in the threaded version of Apache. If you switch to mod_cgi, e.g. by using a non-threaded apache (like I do) that should solve your problem.

这篇关于虚拟主机的错误不会写入指定的ErrorLog,但会写入默认的error_log的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆