博客园  :: 首页  :: 管理

操作系统版本: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