Where is rotatelogs on Ubuntu 16.04? (Upgrade Apache 2.2 to Apache 2.4)

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"

3

1 Answer

To find the path of an executable, use which.

which rotatelogs on a default Apache installation version 2.4.18 on Ubuntu Server 16.04 gives /usr/bin/rotatelogs.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like