apache-2.2 – “没有加载MPM”,但我甚至没有使用mpm

在Vagrant上的Ubuntu Precise64上运行Apache2.当我尝试启动它时,它说:

vagrant@precise64:/etc/apache2$/etc/init.d/apache2 start
 * Starting web server apache2
 *
 * The apache2 configtest failed.
Output of config test was:
AH00534: apache2: Configuration error: No MPM loaded.
Action 'configtest' failed.
The Apache error log may have more information.

但事实是,我的/etc/apache2/apache2.conf文件不会在任何地方调用MPM!我会把它贴在这里,但它会成为一个巨大的帖子……

我试着查找错误日志,但我也找不到任何地方.救命?

编辑:apache2 -l给出:

vagrant@precise64:/$apache2 -l  
Compiled in modules:             
  core.c                         
  mod_so.c                       
  mod_watchdog.c                 
  http_core.c                    
  mod_log_config.c               
  mod_logio.c                    
  mod_version.c                  
  mod_unixd.c                    
  mod_unixd.c

所以看起来没有安装mpm,对吧?如果我的配置文件中没有安装MPM且没有提到MPM,为什么我仍然会看到此错误?

apache2 -t -D DUMP_MODULES(或-M)应该为您提供模块列表.您应该看到worker.c或prefork.c或event.c.使用它来确定您正在使用的MPM.

查看配置文件是否有类似的内容(如果使用prefork MPM).

这是一个例子:

<IfModule mpm_prefork_module>
StartServers          5
MinSpareServers       5
MaxSpareServers      10
MaxClients          150
MaxRequestsPerChild   0
</IfModule>

像这样一个块添加到您的配置文件,它应该工作.验证是否正确安装了apache2-mpm-prefork(或worker或event).

阅读本文档以帮助您选择(必须)适合您的MPM:http://httpd.apache.org/docs/2.2/mpm.html