启动apache-httpd-报错-Configuration error: More than one MPM loaded
Posted on 2023-10-13 16:51 520_1351 阅读(473) 评论(0) 编辑 收藏 举报操作系统版本:Red Hat Enterprise Linux release 8.7 (Ootpa)
Apache的版本:httpd-2.4.37-56.module+el8.8.0+19808+379766d6.7.x86_64
启动httpd服务时,报错: Configuration error: More than one MPM loaded
[root@qq-5201351 conf.modules.d]# systemctl restart httpd Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details. [root@qq-5201351 conf.modules.d]# systemctl status httpd ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2023-10-13 16:22:26 CST; 10s ago Docs: man:httpd.service(8) Process: 51024 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 51024 (code=exited, status=1/FAILURE) Oct 13 16:22:26 qq-5201351 systemd[1]: Starting The Apache HTTP Server... Oct 13 16:22:26 qq-5201351 httpd[51024]: AH00534: httpd: Configuration error: More than one MPM loaded. Oct 13 16:22:26 qq-5201351 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Oct 13 16:22:26 qq-5201351 systemd[1]: httpd.service: Failed with result 'exit-code'. Oct 13 16:22:26 qq-5201351 systemd[1]: Failed to start The Apache HTTP Server. [root@qq-5201351 conf.modules.d]#
根据报错,去看 mpm模块的配置文件:/etc/httpd/conf.modules.d/00-mpm.conf 发现同时加载了,prefork 和 event
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so #LoadModule mpm_worker_module modules/mod_mpm_worker.so LoadModule mpm_event_module modules/mod_mpm_event.so
因为 prefork|worker|event 三种MPM ,同一个时间,只能选择一个加载,2.4默认使用的是evnet,于是注释掉 prefork 或者 event ,再重启 httpd 就正常了
尊重别人的劳动成果 转载请务必注明出处:https://www.cnblogs.com/5201351/p/17762554.html
作者:一名卑微的IT民工
出处:https://www.cnblogs.com/5201351
本博客所有文章仅用于学习、研究和交流目的,欢迎非商业性质转载。
由于博主的水平不高,文章没有高度、深度和广度,只是凑字数,不足和错误之处在所难免,希望大家能够批评指出。
博主是利用读书、参考、引用、复制和粘贴等多种方式打造成自己的文章,请原谅博主成为一个卑微的IT民工!