我将服务器从 Debian 7 升级到了 Debian 8。结果,我遇到了 Apache 2.4.10 的多个问题:
在我的虚拟主机中,我有以下语句,例如
CustomLog "|usr/sbin/rotatelogs -l ${APACHE_LOG_DIR}/02120/%Y%m%d_02120.access.log 86400" combined
这在 Apache 2.2 上非常有效。现在升级到 Apache 2.4 后,我无法启动 Apache 2.4。我很快发现 rotatelogs 现在位于“/usr/bin/rotatelogs”。因此我将行更改为
CustomLog "|/usr/bin/rotatelogs -l ${APACHE_LOG_DIR}/02180/%Y%m%d_02180.access.log 86400" combined
注意,我在开头还添加了斜线。瞧,Apache 2.4 重新启动,现在将日志放到定义的位置并进行记录。
现在灾难开始显现:同时,每次访问服务器时,我都会在主 Apache 2 错误日志文件中收到以下错误消息:
AH00106: piped log program 'usr/bin/rotatelogs -l /var/log/apache2/02180/%Y%m%d_02180.access.log 86400' failed unexpectedly
AH00106: piped log program 'usr/bin/rotatelogs -l /var/log/apache2/%Y%W_stifterdienst.access.log 604800' failed unexpectedly
AH00106: piped log program 'usr/bin/rotatelogs -l /var/log/apache2/%Y%W_stifterdienst.access.log 604800' failed unexpectedly
[core:error] [pid 5178] (2)No such file or directory: AH00088: exec of 'usr/bin/rotatelogs' failed
[core:error] [pid 5177] (2)No such file or directory: AH00088: exec of 'usr/bin/rotatelogs' failed
[core:error] [pid 5176] (2)No such file or directory: AH00088: exec of 'usr/bin/rotatelogs' failed
我不知道从哪里继续。很抱歉问这个问题,但我迷路了。