The "No Apache MPM package installed" error typically occurs when Apache's Multi-Processing Module (MPM) isn't properly configured or recognized during virtual host setup. This is particularly common when working with Apache 2.2 on Debian-based systems.
First, verify which MPM is actually installed:
apache2 -l | grep mpm
Or check the installed packages:
dpkg -l | grep apache2-mpm
Even when prefork is installed, you might encounter this error after running:
a2ensite example.com
a2dissite default
/etc/init.d/apache2 reload
The system fails to properly detect the MPM module during configuration changes.
Try these steps to resolve the issue:
# Ensure the MPM module is enabled
a2enmod mpm_prefork
# Check the symlinks in mods-enabled
ls -l /etc/apache2/mods-enabled/mpm_*
# Restart Apache completely instead of reload
/etc/init.d/apache2 restart
Examine your Apache configuration files:
# Check the main configuration
grep -r "MPM" /etc/apache2/
# Verify the ports.conf file
cat /etc/apache2/ports.conf
If the issue persists, consider reinstalling the MPM package:
apt-get --reinstall install apache2-mpm-prefork
Run Apache's configuration test to identify potential issues:
apache2ctl -t
apache2ctl -S
Here's a proper virtual host configuration that works with MPM:
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog /var/www/example.com/logs/error.log
CustomLog /var/www/example.com/logs/access.log combined
</VirtualHost>
After making changes, verify everything works:
# Check running processes
ps aux | grep apache
# Verify listening ports
netstat -tulpn | grep apache
When configuring virtual hosts on Apache 2.2, you might encounter the frustrating "No apache MPM package installed" error despite having prefork installed. This typically occurs during operations like a2ensite
, a2dissite
, or server reloads.
The error often surfaces when:
- The MPM module isn't properly enabled in Apache's configuration
- There's a mismatch between installed packages and enabled modules
- Configuration files reference non-existent MPM modules
First, verify your current MPM status:
apache2ctl -M | grep mpm
apache2 -l | grep mpm
Check installed packages on Debian/Ubuntu:
dpkg -l | grep apache2-mpm
If prefork is installed but not recognized:
# Enable the MPM module
sudo a2enmod mpm_prefork
# Verify module loading
sudo apache2ctl -t -D DUMP_MODULES
# Restart Apache properly
sudo systemctl restart apache2
Inspect these critical files:
/etc/apache2/mods-available/mpm_prefork.conf
/etc/apache2/mods-enabled/mpm_prefork.load
/etc/apache2/apache2.conf
For different server needs, consider:
# For worker MPM
sudo apt-get install apache2-mpm-worker
sudo a2dismod mpm_prefork
sudo a2enmod mpm_worker
After fixes, test with:
sudo apache2ctl configtest
sudo tail -f /var/log/apache2/error.log