0

I upgraded the server from Debian 7 to Debian 8. As a result I have multiple issues with Apache 2.4.10:

In my virtual hosts I had the following statements e.g.

CustomLog "|usr/sbin/rotatelogs -l ${APACHE_LOG_DIR}/02120/%Y%m%d_02120.access.log 86400" combined

This worked like charm on Apache 2.2. Now after having upgraded to Apache 2.4 I was not able to start Apache 2.4. I soon found out that rotatelogs is now at "/usr/bin/rotatelogs". Thus I changed the line to

CustomLog "|/usr/bin/rotatelogs -l ${APACHE_LOG_DIR}/02180/%Y%m%d_02180.access.log 86400" combined

Note I also added the slash at the beginning. Voilà, Apache 2.4 restarted and now puts the logs to the defined location and does the logging.

Now disaster starts to unfold: At the same time I get for every hit to the server the following error message in the main apache 2 error log file:

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

I have not idea where to continue from here. I am sorry for asking this question but I am lost.

kghbln
  • 411
  • 2
  • 10
  • 20
  • Obviously part of the problem was that I started Apache2 with `service apache2 start`. Now having switched to using `apache2ctl start` Apache2 fails starting as expected with: `AH00104: unable to start piped log program 'usr/bin/rotatelogs -l /var/log/apache2/%Y%W_02180.access.log 604800' AH00015: Unable to open logs`. rotatelogs is at `/usr/bin/rotatelogs` so this is a disaster for me. – kghbln Apr 11 '16 at 17:54
  • Changing from `"|/usr/bin/rotatelogs ..."` to `"|usr/bin/rotatelogs ..."` per comment which was deleted in the meantime did not help. Apache2 still cheerfully fails. – kghbln Apr 11 '16 at 18:12
  • Commenting out the rotatelogs lines now allows me to restart apache2. However, I am still very much confused. rotatelogs is at `/usr/bin/rotatelogs` and apache2 tells me `AH00104: unable to start piped log program` as well as `AH00015: Unable to open logs` I believe this should be a thing noobs may handle. I am confused. – kghbln Apr 11 '16 at 18:33
  • `/usr/bin/rotatelogs` is owned by "root" with "755" permissions. Should this somehow be changed? I would really like to log the hits to my website which worked in Apache 1.3, 2.0 and 2.2. Any help is appreciated. – kghbln Apr 11 '16 at 19:06
  • now it is working all of a sudden. it must be `"|/usr/bin/rotatelogs ..."` since `"|usr/bin/rotatelogs ..."` will fail. This must be a new Debian 8 specific thing since the documentation at [apache.org](http://httpd.apache.org/docs/2.4/programs/rotatelogs.html#comments_thread) advises not to add the slash after the pipe in its examples. Note: it is not a permission and ownership things. – kghbln Apr 11 '16 at 19:47
  • I guess there must still have been a `"|usr/bin/rotatelogs ..."` in one of the VirtualHosts. Never mind. I will keep this as an item to remember. – kghbln Apr 12 '16 at 15:51

0 Answers0