docker/httpd: Configuration error: No MPM loaded

ah00534: httpd: configuration error: more than one mpm loaded.
ah00526: syntax error on line 26 of /etc/httpd/conf d autoindex conf
00-mpm conf
apache configure with mpm
apache windows mpm configuration
apache mpm event centos 7
mpm-itk centos 7
mpm_prefork_module

I have a docker container based in the httpd official image. From nowhere (after a new build), it started failing with the error:

AH00534: httpd: Configuration error: No MPM loaded.

Nothing else.

I'm using the official httpd image (FROM httpd:2.4) and everything was working fine until now. The error appeared only after pruning all images in my system with a docker system prune -af

(edit, thanks delboy1978uk) The error could be avoided if applied a simple best practice: pin your docker images to a specific version instead of latest.


After digging the commits of the official httpd image, I found the solution. (maybe this question/answer may help others)

For those who stumble onto this note while looking for a solution, just add LoadModule mpm_event_module modules/mod_mpm_event.so into httpd.conf above the other LoadModule directives.

(from the comments on the commit #17166574)

So, because I was overriding the file /usr/local/apache2/conf/httpd.conf without explicitly declare an MPM module, after this commit, my image started to fail. With this quick fix, everything is fine now.

For the complete correction, add this to your httpd.conf file (thanks svinther):

LoadModule mpm_event_module modules/mod_mpm_event.so
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so

or, for a more future-proof solution, you could modify the original http.conf file using sed.

AH00534: httpd: Configuration error: No MPM loaded, (Stealing from jsbillings' answer to help get this marked solved.) It looks like you are using a config file from an older install (CentOS 6 or Apache 2.2). I run it on a single docker host and need to move it to a different host. I’ve migrated the data and started the container with the same command I’ve always used, but for some reason, the image exits after about a second with the following error: AH00534: apache2: Configuration error: No MPM loaded. Unfortunately, that’s all the output I get.

After comparing my configuration with latest httpd:2.4 configuration, I found that these new lines needed to be merged into conf/httpd.conf

LoadModule mpm_event_module modules/mod_mpm_event.so
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so

Note to self: When building the derivative httpd docker image, it would probably be better to mod the conf files with sed, than to just COPY in a static file

AH00534: httpd: Configuration error: No MPM loaded. · Issue #3 , Looks like they changed the httpd docker image to use shared MPM modules bet that broke more than a few docker images. Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Much as the accepted solution works, it is less than ideal. The real reason you are getting this error is most likely the fact that your Dockerfile begins with the following line:

FROM httpd:latest

That latest part, is you asking for the latest and greatest version of Apache.

Don't do that. This is your infrastructure. Lock it down to a version number.

Something like

FROM apache:2.4.0

This is the real answer. Not doing that risks your own codebase failing when third party software vendors update their code.

Get the latest version of httpd.conf, and take a note of the version number, then tweak it with your changes, and get that :latest the hell out of your Dockerfile.

Configuration error: No MPM loaded · Issue #392 · docker , While using php:7.0-apache image it fails with the error AH00534: apache2: Configuration error: No MPM loaded This is on a Oracle 7 linux  I have a CentOS Linux release 7.1.1503 (Core) system and I have installed httpd and the corresponding configuration file is : # # This is the main rConfig Apache server configuration file. It contains the # configuration directives that give the server its instructions.

I´m using this in my docker file

FROM php:7.2-apache

And i fixed this problem adding this line to /etc/docker/daemon.json

{
    "storage-driver": "devicemapper"
}

Docker container fails with "AH00534: apache2: Configuration error , I run it on a single docker host and need to move it to a different host. I've been running the nextcloud docker image (apache) for quite some time without any trouble. I run it on a AH00534: apache2: Configuration error: No MPM loaded. AH00534: apache2: Configuration error: No MPM loaded This is on a Oracle 7 linux box Linux minion-wallaby.localdomain 4.1.12-61.1.28.el7uek.x86_64 #2 SMP Thu Feb 23 19:55:12 PST 2017 x86_64 x86_64 x86_64 GNU/Linux

[SOLVED] AH00534: httpd: Configuration error: No MPM loaded., Cannot start httpd because of the subject line: AH00534: httpd: Configuation error​: no MPM loaded. The only references to MPM I see in httpd. AH00534: httpd: Configuration error: No MPM loaded. [SOLVED] This post has been made before, didn't find any of the solutions to fix the problem.

"no MPM loaded", but I'm not even using mpm, Output of config test was: AH00534: apache2: Configuration error: No MPM loaded. Action 'configtest' failed. The Apache error log may have more information. I have a docker container based in the httpd official image. From nowhere (after a new build), it started failing with the error: AH00534: httpd: Configuration error: No MPM loaded. Nothing else. I'm using the official httpd image (FROM httpd:2.4) and everything was working fine until now.

How we fix the httpd configuration error: No MPM loaded, The httpd configuration error: No MPM loaded occurs due to missing module or corrupted configuration. Because MPM binds network ports to  The default MPM, either selected automatically or specified with the --with-mpm option of the configure script, will be loaded in the generated server configuration file. Edit the LoadModule directive to select a different MPM.

Comments
  • Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP
  • Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP
  • Ha you broke your own rule, don't get the latest version of httpd.conf, get the one for 2.4.0 :)