I get the following when I try to start the apache server,
I built the 2.4.6 version and have placed in a local location.
[apacheas@twproxy1 bin]$ ./apachectl -k start
AH00534: httpd: Configuration error: More than one MPM loaded.
Based on some information provided on some sites, I tries to list down the modules available (not sure!) as below.
[apacheas@twproxy1 bin]$ ./httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c
event.c
What could be going wrong?
This is related to the recent Heart Bleed bug in openssl — for which we were advised to upgrade both apache and openssl version.
We did all, but stuck with the above problem/
asked Jun 5, 2014 at 12:45
1
Check all your enabled mods inside mods-enabled directory. If you already enabled mpm_prefork
, you should disable the worker
module.
sudo a2dismod worker
sudo service apache2 restart
Soviut
86.8k48 gold badges187 silver badges254 bronze badges
answered May 17, 2015 at 1:09
3
Look in: /etc/httpd/conf.modules.d
You’ll find a file called: 00-mpm.conf
You can uncomment only one out of those 3 lines:
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
More informations here : https://httpd.apache.org/docs/2.4/mpm.html
answered Aug 22, 2014 at 12:39
HoniixHoniix
3153 silver badges6 bronze badges
In Ubuntu solution is same as above but there is is only difference of file :
cd /etc/apache2/mods-enabled
root@ip:/etc/apache2/mods-enabled# ll mpm_*
lrwxrwxrwx 1 root root 32 Jun 30 10:33 mpm_event.conf -> ../mods-available/mpm_event.conf
lrwxrwxrwx 1 root root 32 Jun 30 10:33 mpm_event.load -> ../mods-available/mpm_event.load
lrwxrwxrwx 1 root root 34 Jun 30 11:36 mpm_prefork.conf -> ../mods-available/mpm_prefork.conf
lrwxrwxrwx 1 root root 34 Jun 30 11:36 mpm_prefork.load -> ../mods-available/mpm_prefork.load
root@ip:/etc/apache2/mods-enabled# cat mpm_event.load
# Conflicts: mpm_worker mpm_prefork mpm_itk
#LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
root@ip-10-0-0-249:/etc/apache2/mods-enabled# cat mpm_prefork.load
# Conflicts: mpm_event mpm_worker mpm_itk
LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so
ie comment out any one of the above module
root@ip:/etc/apache2/mods-enabled# service apache2 restart
This will do !! It worked for me !
answered Jul 1, 2015 at 7:46
Ashish KarpeAshish Karpe
4,6196 gold badges39 silver badges62 bronze badges
3
To fix the «More than one MPM loaded» error under Centos 7.0 after updating Apache try the following:
sudo vim /etc/httpd/conf.modules.d/00-mpm.conf
and comment this line
#Change from
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#To
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
The issue is that multiple Multi-Processing Modules are being loaded meaning Apache can’t decide what model it should be using, causing this error.
Alex Taylor
8,1334 gold badges25 silver badges39 bronze badges
answered Jul 24, 2017 at 22:59
1
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:
- mpm_prefork.conf
- mpm_prefork.load
In /etc/apache2/mods-available/
, there are the following listed:
- mpm_event.conf
- mpm_event.load
- mpm_prefork.conf
- mpm_prefork.load
- mpm_worker.conf
- 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!
asked Nov 21, 2014 at 15:14
JamieHowardJamieHoward
1311 gold badge1 silver badge4 bronze badges
5
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
answered Oct 4, 2016 at 17:50
UnbelieverUnbeliever
2,3161 gold badge9 silver badges18 bronze badges
Содержание
- Multi-Processing Modules (MPMs)
- See also
- Introduction
- MPM Defaults
- Building an MPM as a static module
- Building an MPM as a DSO module
- Comments
- Multi-Processing Modules (MPMs)
- See also
- Introduction ¶
- MPM Defaults ¶
- Building an MPM as a static module ¶
- Building an MPM as a DSO module ¶
- Comments
- Heroku — AH00534: apache2: Configuration error: More than one MPM loaded. #293
- Comments
- apache error
Multi-Processing Modules (MPMs)
This document describes what a Multi-Processing Module is and how they are used by the Apache HTTP Server.
See also
Introduction
The Apache HTTP Server is designed to be a powerful and flexible web server that can work on a very wide variety of platforms in a range of different environments. Different platforms and different environments often require different features, or may have different ways of implementing the same feature most efficiently. Apache httpd has always accommodated a wide variety of environments through its modular design. This design allows the webmaster to choose which features will be included in the server by selecting which modules to load either at compile-time or at run-time.
Apache HTTP Server 2.0 extends this modular design to the most basic functions of a web server. The server ships with a selection of Multi-Processing Modules (MPMs) which are responsible for binding to network ports on the machine, accepting requests, and dispatching children to handle the requests.
Extending the modular design to this level of the server allows two important benefits:
- Apache httpd can more cleanly and efficiently support a wide variety of operating systems. In particular, the Windows version of the server is now much more efficient, since mpm_winnt can use native networking features in place of the POSIX layer used in Apache httpd 1.3. This benefit also extends to other operating systems that implement specialized MPMs.
- The server can be better customized for the needs of the particular site. For example, sites that need a great deal of scalability can choose to use a threaded MPM like worker or event , while sites requiring stability or compatibility with older software can use a prefork .
At the user level, MPMs appear much like other Apache httpd modules. The main difference is that one and only one MPM must be loaded into the server at any time. The list of available MPMs appears on the module index page.
MPM Defaults
The following table lists the default MPMs for various operating systems. This will be the MPM selected if you do not make another choice at compile-time.
Netware | mpm_netware |
OS/2 | mpmt_os2 |
Unix | prefork , worker , or event , depending on platform capabilities |
Windows | mpm_winnt |
Here, ‘Unix’ is used to mean Unix-like operating systems, such as Linux, BSD, Solaris, Mac OS X, etc.
In the case of Unix, the decision as to which MPM is installed is based on two questions:
1. Does the system support threads?
2. Does the system support thread-safe polling (Specifically, the kqueue and epoll functions)?
If the answer to both questions is ‘yes’, the default MPM is event .
If The answer to #1 is ‘yes’, but the answer to #2 is ‘no’, the default will be worker .
If the answer to both questions is ‘no’, then the default MPM will be prefork .
In practical terms, this means that the default will almost always be event , as all modern operating systems support these two features.
Building an MPM as a static module
MPMs can be built as static modules on all platforms. A single MPM is chosen at build time and linked into the server. The server must be rebuilt in order to change the MPM.
To override the default MPM choice, use the —with-mpm=NAME option of the configure script. NAME is the name of the desired MPM.
Once the server has been compiled, it is possible to determine which MPM was chosen by using ./httpd -l . This command will list every module that is compiled into the server, including the MPM.
Building an MPM as a DSO module
On Unix and similar platforms, MPMs can be built as DSO modules and dynamically loaded into the server in the same manner as other DSO modules. Building MPMs as DSO modules allows the MPM to be changed by updating the LoadModule directive for the MPM instead of by rebuilding the server.
Attempting to LoadModule more than one MPM will result in a startup failure with the following error.
AH00534: httpd: Configuration error: More than one MPM loaded.
This feature is enabled using the —enable-mpms-shared option of the configure script. With argument all , all possible MPMs for the platform will be installed. Alternately, a list of MPMs can be specified as the argument.
The default MPM, either selected automatically or specified with the —with-mpm option of the configure script, will be loaded in the generated server configuration file. Edit the LoadModule directive to select a different MPM.
Copyright 2022 The Apache Software Foundation.
Licensed under the Apache License, Version 2.0.
Источник
Multi-Processing Modules (MPMs)
This document describes what a Multi-Processing Module is and how they are used by the Apache HTTP Server.
See also
Introduction ¶
The Apache HTTP Server is designed to be a powerful and flexible web server that can work on a very wide variety of platforms in a range of different environments. Different platforms and different environments often require different features, or may have different ways of implementing the same feature most efficiently. Apache httpd has always accommodated a wide variety of environments through its modular design. This design allows the webmaster to choose which features will be included in the server by selecting which modules to load either at compile-time or at run-time.
Apache HTTP Server 2.0 extends this modular design to the most basic functions of a web server. The server ships with a selection of Multi-Processing Modules (MPMs) which are responsible for binding to network ports on the machine, accepting requests, and dispatching children to handle the requests.
Extending the modular design to this level of the server allows two important benefits:
- Apache httpd can more cleanly and efficiently support a wide variety of operating systems. In particular, the Windows version of the server is now much more efficient, since mpm_winnt can use native networking features in place of the POSIX layer used in Apache httpd 1.3. This benefit also extends to other operating systems that implement specialized MPMs.
- The server can be better customized for the needs of the particular site. For example, sites that need a great deal of scalability can choose to use a threaded MPM like worker or event , while sites requiring stability or compatibility with older software can use a prefork .
At the user level, MPMs appear much like other Apache httpd modules. The main difference is that one and only one MPM must be loaded into the server at any time. The list of available MPMs appears on the module index page.
MPM Defaults ¶
The following table lists the default MPMs for various operating systems. This will be the MPM selected if you do not make another choice at compile-time.
Netware | mpm_netware |
OS/2 | mpmt_os2 |
Unix | prefork , worker , or event , depending on platform capabilities |
Windows | mpm_winnt |
Here, ‘Unix’ is used to mean Unix-like operating systems, such as Linux, BSD, Solaris, Mac OS X, etc.
In the case of Unix, the decision as to which MPM is installed is based on two questions:
1. Does the system support threads?
2. Does the system support thread-safe polling (Specifically, the kqueue and epoll functions)?
If the answer to both questions is ‘yes’, the default MPM is event .
If The answer to #1 is ‘yes’, but the answer to #2 is ‘no’, the default will be worker .
If the answer to both questions is ‘no’, then the default MPM will be prefork .
In practical terms, this means that the default will almost always be event , as all modern operating systems support these two features.
Building an MPM as a static module ¶
MPMs can be built as static modules on all platforms. A single MPM is chosen at build time and linked into the server. The server must be rebuilt in order to change the MPM.
To override the default MPM choice, use the —with-mpm=NAME option of the configure script. NAME is the name of the desired MPM.
Once the server has been compiled, it is possible to determine which MPM was chosen by using ./httpd -l . This command will list every module that is compiled into the server, including the MPM.
Building an MPM as a DSO module ¶
On Unix and similar platforms, MPMs can be built as DSO modules and dynamically loaded into the server in the same manner as other DSO modules. Building MPMs as DSO modules allows the MPM to be changed by updating the LoadModule directive for the MPM instead of by rebuilding the server.
Attempting to LoadModule more than one MPM will result in a startup failure with the following error.
AH00534: httpd: Configuration error: More than one MPM loaded.
This feature is enabled using the —enable-mpms-shared option of the configure script. With argument all , all possible MPMs for the platform will be installed. Alternately, a list of MPMs can be specified as the argument.
The default MPM, either selected automatically or specified with the —with-mpm option of the configure script, will be loaded in the generated server configuration file. Edit the LoadModule directive to select a different MPM.
Copyright 2021 The Apache Software Foundation.
Licensed under the Apache License, Version 2.0.
Источник
Heroku — AH00534: apache2: Configuration error: More than one MPM loaded. #293
When I create a simple Dockerfile:
It runs just fine locally and everything is nice and dandy but pushing it to Heroku fails when apache is starting.
The container dies to fast to go in and have a look at which modules are actually loaded.
Any ideas? Does anyone knows which modules are actually needed or what can fails in the scripts here.
Note that before the error the message Complete! WordPress has been successfully copied to /var/www/html is printed which seems to indicate the actual wp setup is successful.
The text was updated successfully, but these errors were encountered:
We had to switch to the buildpack, no time to sort this.
I was investigating this issue today with @fresswolf
What we found is that Heroku is doing something very strange with docker images that contain apache. It seems that before the container is started Heroku is injecting some files into the folde /etc/apache2/ .
The «php» docker image is enabling the module «mpm_prefork», and thus creates the file /etc/apache2/mods-enabled/mpm_prefork.load . Heroku later injects its own set of configuration files which includes the file /etc/apache2/mods-enabled/mpm_event.load . We end up with 2 mpm modules loaded, which makes apache fail.
We opened a support ticket with Heroku about it.
Steps to reproduce:
- Create a Dockerfile with apache installed, but the whole folder /etc/apache2/ removed. When the container is started it will list the contents of `/etc/apache2/
Источник
apache error
установил обновление на apache 2.4.39, теперь не запускается
Unit httpd.service has begun starting up. May 21 10:27:27 kz-tnsweb01.kar-tel.local httpd[5330]: [Tue May 21 10:27:27.412701 2019] [so:warn] [pid 5330:tid 1405047618 May 21 10:27:27 kz-tnsweb01.kar-tel.local httpd[5330]: AH00534: httpd: Configuration error: More than one MPM loaded. May 21 10:27:27 kz-tnsweb01.kar-tel.local systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE May 21 10:27:27 kz-tnsweb01.kar-tel.local kill[5332]: kill: cannot find process «» May 21 10:27:27 kz-tnsweb01.kar-tel.local systemd[1]: httpd.service: control process exited, code=exited status=1 May 21 10:27:27 kz-tnsweb01.kar-tel.local systemd[1]: Failed to start The Apache HTTP Server. — Subject: Unit httpd.service has failed — Defined-By: systemd — Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel — — Unit httpd.service has failed. — — The result is failed. May 21 10:27:27 kz-tnsweb01.kar-tel.local systemd[1]: Unit httpd.service entered failed state. May 21 10:27:27 kz-tnsweb01.kar-tel.local systemd[1]: httpd.service failed. May 21 10:27:27 kz-tnsweb01.kar-tel.local polkitd[4430]: Unregistered Authentication Agent for unix-process:5325:66175 (sys May 21 10:27:36 kz-tnsweb01.kar-tel.local sudo[5336]: kbigaliev : TTY=pts/1 ; PWD=/usr/lib/systemd ; USER=root ; COMMAND=/b
httpd: Configuration error: More than one MPM loaded.
Что может быть не понятного в строке?
ну вот прям первая ссылка в гугле описывает вашу ситуацию.
обновили, при переносе конфига какую-то строку написали 2 раза.
не чего лишнего нет
# prefork MPM: Implements a non-threaded, pre-forking web server # See: http://httpd.apache.org/docs/2.4/mod/prefork.html LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
# worker MPM: Multi-Processing Module implementing a hybrid # multi-threaded multi-process web server # See: http://httpd.apache.org/docs/2.4/mod/worker.html # #LoadModule mpm_worker_module modules/mod_mpm_worker.so
# event MPM: A variant of the worker MPM with the goal of consuming # threads only for connections with active processing # See: http://httpd.apache.org/docs/2.4/mod/event.html # #LoadModule mpm_event_module modules/mod_mpm_event.so
httpd: Configuration error: More than one MPM loaded.
Источник
I was investigating this issue today with @fresswolf
What we found is that Heroku is doing something very strange with docker images that contain apache. It seems that before the container is started Heroku is injecting some files into the folde /etc/apache2/
.
The «php» docker image is enabling the module «mpm_prefork», and thus creates the file /etc/apache2/mods-enabled/mpm_prefork.load
. Heroku later injects its own set of configuration files which includes the file /etc/apache2/mods-enabled/mpm_event.load
. We end up with 2 mpm modules loaded, which makes apache fail.
We opened a support ticket with Heroku about it.
Steps to reproduce:
- Create a Dockerfile with apache installed, but the whole folder
/etc/apache2/
removed. When the container is started it will list the contents of `/etc/apache2/
FROM debian:stretch-slim
RUN apt-get update && apt-get install -qy apache2
RUN rm -rf /etc/apache2
ENTRYPOINT []
CMD ["find", "/etc/apache2"]
- Build and run it locally. Obviously the folder is empty:
$ docker build -t test . $ docker run --rm test /etc/apache2/mods-enabled/: total 0
- Create a Heroku app, then push the image to the registry:
$ docker tag test registry.heroku.com/<app-name>/web
$ docker push registry.heroku.com/<app-name>/web
$ heroku container:release -a <app-name> web
$ heroku logs -ta <app-name>
2018-06-07T18:05:20.749367+00:00 heroku[web.1]: Starting process with command `find /etc/apache2`
2018-06-07T18:05:22.413759+00:00 app[web.1]: /etc/apache2
2018-06-07T18:05:22.413777+00:00 app[web.1]: /etc/apache2/conf-enabled
2018-06-07T18:05:22.413779+00:00 app[web.1]: /etc/apache2/conf-enabled/serve-cgi-bin.conf
2018-06-07T18:05:22.413780+00:00 app[web.1]: /etc/apache2/conf-enabled/localized-error-pages.conf
2018-06-07T18:05:22.413782+00:00 app[web.1]: /etc/apache2/conf-enabled/other-vhosts-access-log.conf
2018-06-07T18:05:22.413783+00:00 app[web.1]: /etc/apache2/conf-enabled/security.conf
2018-06-07T18:05:22.413784+00:00 app[web.1]: /etc/apache2/conf-enabled/charset.conf
2018-06-07T18:05:22.413785+00:00 app[web.1]: /etc/apache2/magic
2018-06-07T18:05:22.413786+00:00 app[web.1]: /etc/apache2/ports.conf
2018-06-07T18:05:22.413788+00:00 app[web.1]: /etc/apache2/sites-available
2018-06-07T18:05:22.413789+00:00 app[web.1]: /etc/apache2/sites-available/000-default.conf
2018-06-07T18:05:22.413790+00:00 app[web.1]: /etc/apache2/sites-available/default-ssl.conf
2018-06-07T18:05:22.413792+00:00 app[web.1]: /etc/apache2/mods-available
2018-06-07T18:05:22.413793+00:00 app[web.1]: /etc/apache2/mods-available/session_dbd.load
2018-06-07T18:05:22.413794+00:00 app[web.1]: /etc/apache2/mods-available/mime_magic.conf
[...]
The files are magically there again.
Пытаюсь поднять сервер на Ubuntu под виндой с помощью Vagrant.
Процесс медленно, но верно продвигался, но после установки phpMyAdmin апач «умер». При попытке запуска появляется следующее:
$ sudo /etc/init.d/apache2 start
* Starting web server apache2
*
* The apache2 configtest failed.
Output of config test was:
AH00534: apache2: Configuration error: More than one MPM loaded.
Action ‘configtest’ failed.
The Apache error log may have more information.
Нагуглил, что может помочь «$ apt-get install apache2-mpm-itk», появилось следующее сообщение о зависимостях:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:
apache2-mpm-itk : Depends: apache2 (= 2.4.7-1ubuntu4.9) but 2.4.18-1+deb.sury.org~trusty+2 is to be installed
E: Unable to correct problems, you have held broken packages.
Команды «$ sudo aptitude purge apache2.2-common» и «$ sudo aptitude install apache2» ситуацию не исправили. Что делать?? Полную переустановку откладываю до последнего, ибо долго мучился с настройками Апача..
After some time of working i did it myself. You can find the steps below.
Check which MPM apache is currently running:
apachectl -V | grep -i mpm
Result:
Server MPM: prefork
List Available MPM Modules (Make sure mpm_worker is listed)
ls /etc/apache2/mods-available/mpm*
Result:
/etc/apache2/mods-available/mpm_event.conf /etc/apache2/mods-available/mpm_prefork.conf /etc/apache2/mods-available/mpm_worker.conf
/etc/apache2/mods-available/mpm_event.load /etc/apache2/mods-available/mpm_prefork.load /etc/apache2/mods-available/mpm_worker.load
List Enabled MPM Modules (If mpm_worker is not enabled we should enable it and disable the mpm_prefork module)
ls -l /etc/apache2/mods-enabled/mpm*
Result:
/etc/apache2/mods-enabled/mpm_prefork.conf -> ../mods-available/mpm_prefork.conf
/etc/apache2/mods-enabled/mpm_prefork.load -> ../mods-available/mpm_prefork.load
Disable MPM_PREFORK module
a2dismod mpm_prefork
Enable MPM_WORKER module
a2enmod mpm_worker
To check if Apache is running on MPM WORKER
apachectl -V | grep -i mpm
Result:
Server MPM: worker
If you get this error after executing these commands:
Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP
Try to remove libapache2 package:
apt-get remove libapache2-mod-php5
Error scenario: Apache service not working with the following error “Ubuntu apache2[10961]: AH00534: apache2: Configuration error: More than one MPM loaded.”
The following are the error message when I try to start apache service.
root@Ubuntu:/var/log/apache2# /etc/init.d/apache2 restart
[….] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.
failed!
root@Ubuntu:/var/log/apache2#
Root cause: To check the issue, I run the Journalctl-xe for the error logs
root@Ubuntu:/var/log/apache2# journalctl |tail
Mar 07 15:08:10 Ubuntu apache2[10961]: AH00534: apache2: Configuration error: More than one MPM loaded.
Mar 07 15:08:10 Ubuntu apache2[10961]: Action ‘configtest’ failed.
Mar 07 15:08:10 Ubuntu apache2[10961]: The Apache error log may have more information.
Mar 07 15:08:10 Ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Mar 07 15:08:10 Ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Mar 07 15:08:10 Ubuntu systemd[1]: apache2.service: Unit entered failed state.
Mar 07 15:08:10 Ubuntu systemd[1]: apache2.service: Failed with result ‘exit-code’.
Mar 07 15:09:01 Ubuntu CRON[10994]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 07 15:09:01 Ubuntu CRON[10995]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean)
Mar 07 15:09:02 Ubuntu CRON[10994]: pam_unix(cron:session): session closed for user root
root@Ubuntu:/var/log/apache2#
###### The bold highlighted is the cause where there is configuration issue in Apache. Hence I tried to check the configuration check command in Apache.######
root@Ubuntu:/var/log/apache2# apache2ctl -t
AH00534: apache2: Configuration error: More than one MPM loaded.
Action ‘-t’ failed.
The Apache error log may have more information.
root@Ubuntu:/var/log/apache2#
Solution: Run the command a2dismod worker
root@Ubuntu:/var/log/apache2# a2dismod worker
Module worker disabled.
To activate the new configuration, you need to run:
service apache2 restart
root@Ubuntu:/var/log/apache2# systemctl restart apache2.service
root@Ubuntu:/var/log/apache2# apache2ctl -t
Syntax OK
root@Ubuntu:/var/log/apache2#
I have a CentOS Linux release 7.1.1503 (Core)
system and I have installed httpd
and the corresponding configuration file is :
#
# This is the main rConfig Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 60
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
Listen 8888
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule authz_default_module modules/mod_authz_default.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
Include conf.d/*.conf
User apache
Group apache
ServerAdmin <SNIP!>
UseCanonicalName Off
DocumentRoot "/home/app/OK-computer/rconfig/www"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/home/app/OK-computer/rconfig/www">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog /home/app/OK-computer/rconfig/logs/wwwlog/error_log
LogLevel warn
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /home/app/OK-computer/rconfig/logs/wwwlog/access_log combined
ServerSignature On
<IfModule mod_dav_fs.c>
DAVLockDB /var/lib/dav/lockdb
</IfModule>
ScriptAlias /cgi-bin/ "/home/app/OK-computer/rconfig/cgi-bin/"
<Directory "/home/app/OK-computer/rconfig/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
ReadmeName README.html
HeaderName HEADER.html
AddLanguage en .en
LanguagePriority en
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
But I am having issues when trying to restart https
with the configuration in question.
# apachectl configtest
AH00534: httpd: Configuration error: No MPM loaded.
While on /etc/httpd/conf.modules.d/00-mpm.conf
the MPM module is configured to be loaded :
# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:
# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
#LoadModule mpm_event_module modules/mod_mpm_event.so
Would you be so kind to help me solve this issue ?
-
#1
I’ve been struggling with my server (Ubuntu 14.04) running on Plesk 12.5. Recently there’s been problems with the server running .php -files. For some weird reason browsers are not been able to show the php files as they should be but instead browser offers to download these files. This happened with two different machines and 3 different browsers. Since this happened to every php file in the server I concluded that the problem has to be in server and not the browser. So by searching solutions from the internet I also tried to follow one particular instruction. Can’t really relocate the instructions I was trying to follow but it had something to do with «a2enmod php5» -command. Now apache won’t start anymore and I’m trying to plea for help.
Upon «service apache2 start» there’s error message: «AH00534: apache2: Configuration error: More than one MPM loaded.» And here’s some log notes with apache mentioned from /var/log/apache2/error.log -file:
Code:
[suexec:notice] [pid 19224:tid 139880209303424] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[mpm_event:notice] [pid 19225:tid 139880209303424] AH00489: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.1f configured -- resuming normal operations
[core:notice] [pid 19225:tid 139880209303424] AH00094: Command line: '/usr/sbin/apache2'
[mpm_event:notice] [pid 19225:tid 139880209303424] AH00491: caught SIGTERM, shutting down
[suexec:notice] [pid 2513:tid 140375506491264] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[mpm_event:notice] [pid 2514:tid 140375506491264] AH00489: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.1f configured -- resuming normal operations
[core:notice] [pid 2514:tid 140375506491264] AH00094: Command line: '/usr/sbin/apache2'
Any help with this problem is appreciated.
-
#2
Try to fix it with
# plesk repair web
-
#3
Thanks for the advice Igor. Sadly this really didn’t help since trying to repair server-wide configuration parameters does end up with the previously mentioned error message:
Code:
Repairing server-wide configuration parameters for web servers .. [2016-04-27 21:18:11] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/httpdmng' '--reconfigure-server'] with exit code [1]
[FAILED]
- httpdmng failed: [2016-04-27 21:18:09] ERR [util_exec]
proc_close() failed ['/opt/psa/admin/bin/apache-config' '-t']
with exit code [1]
[2016-04-27 21:18:11] ERR [util_exec] proc_close() failed
['/opt/psa/admin/bin/apache-config' '-t'] with exit code [1]
[2016-04-27 21:18:11] ERR [panel] Apache config
(14617810870.82329100) generation failed: Template_Exception:
AH00534: apache2: Configuration error: More than one MPM
loaded.
file:
/opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00534: apache2: Configuration error: More than one MPM
loaded.
-
#4
Apache is misconfigured. Could you please show me output of following SQL query in Plesk database:
select * from Configurations where status=’error’;
-
#5
Here’s the output of Plesk database query:
Code:
+----+------------------------+---------------+--------------------------------------------------------------------------------+----------------------+------------+----------+--------+--------+-------------------------------------------------------------------+--------------------------------------------------------------------------------+
| id | name | serviceNodeId | file | version | objectType | objectId | status | active | description | errorFile |
+----+------------------------+---------------+--------------------------------------------------------------------------------+----------------------+------------+----------+--------+--------+-------------------------------------------------------------------+--------------------------------------------------------------------------------+
| 1 | server | 1 | /etc/apache2/plesk.conf.d/server.conf | 14617817600.19212200 | server | NULL | error | true | AH00534: apache2: Configuration error: More than one MPM loaded.
| /etc/apache2/plesk.conf.d/server.conf |
| 2 | serverHorde | 1 | /etc/apache2/plesk.conf.d/horde.conf | 14617817600.19212200 | server | NULL | error | true | AH00534: apache2: Configuration error: More than one MPM loaded.
| /etc/apache2/plesk.conf.d/horde.conf |
| 3 | serverRoundcube | 1 | /etc/apache2/plesk.conf.d/roundcube.conf | 14617817600.19212200 | server | NULL | error | true | AH00534: apache2: Configuration error: More than one MPM loaded.
| /etc/apache2/plesk.conf.d/roundcube.conf |
| 6 | domainWebmailRoundcube | 1 | /etc/apache2/plesk.conf.d/webmails/roundcube/xxx.xxx.com_webmail.conf | 14617817600.19212200 | domain | 1 | error | true | AH00534: apache2: Configuration error: More than one MPM loaded.
| /etc/apache2/plesk.conf.d/webmails/roundcube/xxx.xxx.com_webmail.conf |
| 8 | domainVhost | 1 | /var/www/vhosts/system/xxx.xxx.com/conf/httpd.conf | 14617816860.59955800 | domain | 1 | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| /var/www/vhosts/system/xxx.xxx.com/conf/httpd.conf |
| 9 | domainVhostIpDefault | 1 | /var/www/vhosts/system/xxx.xxx.com/conf/httpd_ip_default.conf | 14617816860.59955800 | domain | 1 | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| /var/www/vhosts/system/xxx.xxx.com/conf/httpd_ip_default.conf |
| 12 | domainWebmailRoundcube | 1 | /etc/apache2/plesk.conf.d/webmails/roundcube/zzz.com_webmail.conf | 14617817600.19212200 | domain | 2 | error | true | AH00534: apache2: Configuration error: More than one MPM loaded.
| /etc/apache2/plesk.conf.d/webmails/roundcube/zzz.com_webmail.conf |
| 14 | domainVhost | 1 | /var/www/vhosts/system/zzz.com/conf/httpd.conf | 14617816860.59955800 | domain | 2 | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| /var/www/vhosts/system/zzz.com/conf/httpd.conf |
| 16 | domainWebmailRoundcube | 1 | /etc/apache2/plesk.conf.d/webmails/roundcube/yyy.fi_webmail.conf | 14617817600.19212200 | domain | 3 | error | true | AH00534: apache2: Configuration error: More than one MPM loaded.
| /etc/apache2/plesk.conf.d/webmails/roundcube/yyy.fi_webmail.conf |
| 18 | domainVhost | 1 | /var/www/vhosts/system/yyy.fi/conf/httpd.conf | 14617816860.59955800 | domain | 3 | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| /var/www/vhosts/system/yyy.fi/conf/httpd.conf |
| 20 | domainWebmailRoundcube | 1 | /etc/apache2/plesk.conf.d/webmails/roundcube/aaa.fi_webmail.conf | 14617817600.19212200 | domain | 4 | error | true | AH00534: apache2: Configuration error: More than one MPM loaded.
| /etc/apache2/plesk.conf.d/webmails/roundcube/aaa.fi_webmail.conf |
| 22 | domainVhost | 1 | /var/www/vhosts/system/aaa.fi/conf/httpd.conf | 14617816860.59955800 | domain | 4 | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| /var/www/vhosts/system/aaa.fi/conf/httpd.conf |
| 24 | server | 1 | | 14617815580.73257800 | | NULL | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| NULL |
| 25 | serverHorde | 1 | | 14617815580.73257800 | | NULL | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| NULL |
| 26 | serverRoundcube | 1 | | 14617815580.73257800 | | NULL | error | false | AH00534: apache2: Configuration error: More than one MPM loaded.
| NULL |
+----+------------------------+---------------+--------------------------------------------------------------------------------+----------------------+------------+----------+--------+--------+-------------------------------------------------------------------+--------------------------------------------------------------------------------+
15 rows in set (0.00 sec)
-
#6
Ok, finally I got it to work. I disabled php5 mod from /etc/apache2/mods-enabled (a2dismod php5) and mpm_event that was making conflicts. After this apache2 service fired up just fine.