我正在运行Apache / 2.4.29(Ubuntu)
我正面临以下错误。
# apache2ctl -t -f /etc/apache2/sites-available/example.com.conf
AH00534: apache2: Configuration error: No MPM loaded.
Action '-t -f /etc/apache2/sites-available/example.com.conf' failed.
The Apache error log may have more information.
configtest没有错误
# apache2ctl configtest
Syntax OK
/var/log/apache2/error.log
的内容
[core:notice] [pid 2668] AH00094: Command line: '/usr/sbin/apache2'
[mpm_prefork:notice] [pid 2668] AH00169: caught SIGTERM, shutting down
[:notice] [pid 2707] ModSecurity: ModSecurity-Apache v0.1.1-beta configured.
[mpm_prefork:notice] [pid 2715] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[core:notice] [pid 2715] AH00094: Command line: '/usr/sbin/apache2'
大多数论坛的解决方案都指定要加载 mod_mpm_prefork.so
但是,它已经启用。
# ls /etc/apache2/mods-enabled/ | grep "prefork"
mpm_prefork.conf
mpm_prefork.load
mpm_prefork.conf和mpm_prefork.load的内容
# cat /etc/apache2/mods-enabled/mpm_prefork.conf
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 150
MaxConnectionsPerChild 0
</IfModule>
# cat /etc/apache2/mods-enabled/mpm_prefork.load
# Conflicts: mpm_event mpm_worker
LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so
其他命令:
# 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
让我知道如何解决此问题。