在Ubuntu 16.04的Apache 2.4上,rotatelogs
的正确路径是什么?Ubuntu 16.04上的rotatelogs在哪里? (将Apache 2.2升级到Apache 2.4)
在新的Ubuntu 16.04系统上安装了Apache 2.4,但是当使用与Apache 2.2相同的配置时,缺少Apache rotatelogs程序。
在以前的2.2路径是/usr/sbin/rotatelogs
。
Apache安装在Ubuntu 16.04有:
sudo apt-get install apache2 apache2-utils
Rotatelogs似乎是在2.4至记录在案。但是注释表明路径为bin/rotatelogs
,但这会导致错误。
错误:
(2)No such file or directory: AH00089: Couldn't start ErrorLog process 'bin/rotatelogs /sites/mysite/apache_error_%Y.%m.%d.log 5M'.
AH00015: Unable to open logs
在情况下,存在的问题的配置线:
的Apache 2.2(在Ubuntu 12作品)
ErrorLog "||/usr/sbin/rotatelogs /sites/mysite/apache_error_%Y.%m.%d.log 5M"
阿帕奇2.4(二者不在Ubuntu 16上工作)
ErrorLog "||/usr/sbin/rotatelogs /sites/mysite/apache_error_%Y.%m.%d.log 5M"
ErrorLog "|bin/rotatelogs /sites/mysite/apache_error_%Y.%m.%d.log 5M"