大网数据广告活动
服务器运维问答

"More than one MPM loaded" when trying to start apache on Vagrant Ubuntu box

· 52CE 我爱测

Whenever I try sudo apache2ctl start I receive the following message: AH00534: apache2: Configuration error: More than one MPM loaded. Action '-k restart' failed. The Apache error log may have more information. When I check /var/…

问题原文

原帖链接 · JamieHoward · CC BY-SA 3.0

Whenever I try sudo apache2ctl start I receive the following message:

AH00534: apache2: Configuration error: More than one MPM loaded.
Action '-k restart' failed.
The Apache error log may have more information.

When I check /var/log/apache2/error.log, there are no entries for this error. The only mods being included seem to be in /etc/apache2/mods-enabled/, and all I see listed there as related to "mpm" are:

  1. mpm_prefork.conf
  2. mpm_prefork.load

In /etc/apache2/mods-available/, there are the following listed:

  1. mpm_event.conf
  2. mpm_event.load
  3. mpm_prefork.conf
  4. mpm_prefork.load
  5. mpm_worker.conf
  6. mpm_worker.load

However, my apache2.conf file does not load those in mods-available directory.

This is new territory to me, so I may be totally looking in wrong place. Thanks in advance for your help!

社区高分解答

原帖链接 · Unbeliever · CC BY-SA 3.0

This cannot happen in Apache v2.2 (which the question is tagged as), it can only happen in Apache v2.4 where you can compile the three MPMs as dynamically loadable modules.

Search all your configuration files for the following three lines. The paths maybe different of course, depending on your installation. There can only ever be one of these three modules actually loaded. If more than one are present and uncommented you will get the error you mention:

# Only *ONE* of these modules may be uncommented in a valid configuration
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

If you somehow managed to get an Apache installation with one of the MPMs compiled into the httpd binary itself and with one or more of the MPMs as a loadable module then you might also get this.

Run /path/to/httpd -l to see if there is an MPM built in and then search for the above lines as before

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-11-21)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。