0

I am trying to send the apache error logs to STDERR inside a docker container. Here's my site-config.conf file regarding the logs:

<VirtualHost *:8008>
    ErrorLog ${APACHE_LOG_DIR}/test_error.log
    CustomLog ${APACHE_LOG_DIR}/test_access.log combined
</VirtualHost>

Also, here's the relevant part of the Dockerfile:

RUN ln -sf /dev/stdout /var/log/apache2/test_access.log \
&& ln -sf /dev/stderr /var/log/apache2/test_error.log

For the STDOUT it works just fine, but the error log doesn't appear at all in the docker logs.

I even tested this version of the Dockerfile:

RUN ln -sf /dev/stdout /var/log/apache2/test_access.log \
&& ln -sf /dev/stdout /var/log/apache2/test_error.log

And this way the errors appeared. I also verified that I have the /dev/stderr file and it points to /proc/self/fd/2.

Do you have any clue why the docker logs doesn't contain the STDERR logs?

Tojas
  • 115
  • 6

0 Answers0