Skip to content

Apache fails accessing log files (container crashes) #754

@liarco

Description

@liarco

Hi everyone,
I'm having an issue with the following setup:

  • ubuntu 18.04
  • docker 18.09
  • latest php7.2-apache image (honestly I'm using the official WordPress image based on the PHP one, but I think the error is not related to WP)
  • the image is running as an arbitrary user (I'm following the guidelines about this)

It used to work perfectly (and it still does on machines that are not running the latest version), but at some point something must have changed and now the container boots, runs every task before starting apache, then it fires this error (before crashing):

(13)Permission denied: AH00091: apache2: could not open error log file /var/log/apache2/error.log.
AH00015: Unable to open logs

No other error is fired before this...

I tried moving the log dir with APACHE_LOG_DIR: /tmp/apache2/logs and it works (as a ugly hack), but unfortunately symlinks to /dev/std* are not working because I think that they're created at build time (here are the lines in the Dockerfile).

Is this my fault or what?

Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions