phpearth / docker-php

🐳 Docker For PHP developers - Docker images with PHP, Nginx, OpenLiteSpeed, Apache, Lighttpd, and Alpine
https://docs.php.earth/docker
MIT License
261 stars 80 forks source link

MPM not loaded? #45

Open icsy7867 opened 4 years ago

icsy7867 commented 4 years ago

I am having a weird issue on a RHEL 7.4 box. Whenever I try to run a fairly simply docker container, it seems to successfully build except for a warning:

Enabling module rewrite. find: '/var/lib/apache2/module/enabled_by_maint/mpm_event': No such file or directory To activate the new configuration, you need to run: service apache2 restart

The image seems to build anyways and I try to start it. It fails and I get this error:

AH00534: apache2: Configuration error: No MPM loaded.

I tried to load mod_mpm_event.so into the httpd.conf manually, but while building I am told the file doesn't exist.

I have included my dockerfile here. Hoping someone has some ideas! Thanks.

FROM php:7.2-apache

RUN set -x \
    && apt-get update && apt-get install unzip -y \
        && apt-get install -y libldap2-dev ldap-utils \
        && apt-get install -y git openssh-server \
        && rm -rf /var/lib/apt/lists/* \
        && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
        && docker-php-ext-install ldap \
        && apt-get purge -y --auto-remove libldap2-dev
RUN a2enmod rewrite

#RUN echo "LoadModule mpm_event_module modules/mod_mpm_event.so" >> /usr/local/apache2/conf/httpd.conf

EXPOSE 8080:80

I've also tried php:latest with the same error. Docker version is reporting 1.13.1

icsy7867 commented 4 years ago

After poking around, I think docker 1.13.1 is quite old. Looking at getting this upgraded.

tsubasaogawa commented 4 years ago

I saw the same problem on Windows 10 + Vagrant (CentOS 7 Box).

 ---> Running in 289320dc1d8e
Enabling module rewrite.
find: '/var/lib/apache2/module/enabled_by_maint/mpm_event': No such file or directory
To activate the new configuration, you need to run:
  service apache2 restart

But, I was able to build the same image with no error on Amazon Linux 2 (EC2).

 ---> Running in 0cf959efe17f
Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart

Docker versions are 19.03.6-ce. I think it is a problem of VirtualBox.