Reputation: 6083
What is the correct path for rotatelogs
on Apache 2.4 on Ubuntu 16.04?
On new Ubuntu 16.04 system installed Apache 2.4, however when using the same config as previous Ubuntu 12 with Apache 2.2 the Apache rotatelogs program is missing.
In previous 2.2 the path was /usr/sbin/rotatelogs
.
Installed Apache on Ubuntu 16.04 with:
sudo apt-get install apache2 apache2-utils
Rotatelogs seems to be documented in 2.4. However the comments indicate path of bin/rotatelogs
, but that results in error.
Error:
(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
In case there are questions the config lines:
Apache 2.2 (works on Ubuntu 12)
ErrorLog "||/usr/sbin/rotatelogs /sites/mysite/apache_error_%Y.%m.%d.log 5M"
Apache 2.4 (both don't work on 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"
Upvotes: 2
Views: 1224
Reputation: 6083
To find the path of an executable, use which
.
Example usage which rotatelogs
and it should give your path. Mine is currently /usr/bin/rotatelogs
So the ErrorLog
command would be
ErrorLog "|/usr/bin/rotatelogs /sites/mysite/apache_error_%Y.%m.%d.log 5M"
Upvotes: 4