Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Running Apache2 on Ubuntu Precise64 in Vagrant. When I try to start it, it says:

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.

But the thing is, my /etc/apache2/apache2.conf file doesn't call for MPM anywhere! I would paste it here but it would make for a huge post...

I tried looking up the error log, but I can't find that anywhere, either. Help?

Edit: apache2 -l gives this:

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                    

So it looks like no mpm is installed, right? If no MPM installed and no MPM mentioned in my config file, why am I still seeing this error?

share|improve this question
    
What is the output of dpkg -l 'apache2-mpm*' –  sciurus Oct 19 '13 at 18:02

2 Answers 2

up vote 6 down vote accepted

apache2 -t -D DUMP_MODULES (or -M) should give you a list of modules. You should see worker.c or prefork.c or event.c. Use this to determine which MPM you're using.

Look in your config files if there's something like (if you use the prefork MPM).

Here's an example :

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

Add a block like this one to your config file and it should work. Verify that the apache2-mpm-prefork (or worker, or event) is correctly installed.

Read this documentation to help you choose (it is mandatory) the appropriate MPM for your usage : http://httpd.apache.org/docs/2.2/mpm.html

share|improve this answer
    
Updated the original question with the command output... It looks like there is no mpm model at all, so I don't understand why I am seeing the error. Any idea? –  ezuk Oct 18 '13 at 12:21
1  
You must choose a MPM module, it's mandatory. –  Vinz Oct 18 '13 at 22:12
    
@ezuk : Did it help ? If yes, please, accept my answer. –  Vinz Oct 21 '13 at 15:29
    
Hi @Vinz. I actually have the same problem (Ubuntu 13.10, Apache 2.4.6) and tried your solution. I was missing that block in my config file, but adding it did not solve the problem. Any other ideas? I'm kinda lost here. –  Itai Bar-Haim Oct 25 '13 at 8:10
    
@ItaiBar-Haim : What is the error message after adding this block ? –  Vinz Oct 28 '13 at 10:11

I had the same issue. I accidentally overwrote /etc/apache2/apache2.conf. To rectify, I had to run sudo apt-get purge apache2 to completely remove apache and then run sudo apt-get install apache2 to get the original apache2.conf file back.

NOTE: Back up any custom files under /etc/apache2/sites-available before purging.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.