docker/httpd: Configuration error: No MPM loaded

前端 未结 5 687
太阳男子
太阳男子 2020-12-13 19:46

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: Configurati         


        
5条回答
  •  清歌不尽
    2020-12-13 20:02

    (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.

提交回复
热议问题