Author Topic: problem changing mpm to prefork  (Read 2878 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
problem changing mpm to prefork
« on: September 19, 2021, 11:37:44 PM »
Hello all, im trying to change the apaches mpm so i can use php as mod_php to my site , but i couldnt found where is the event mpm loaded..

when i tried to load prefork as mpm is receive;

httpd: Configuration error: More than one MPM loaded.

Ive already checked this thread but i guess its old.
http://forum.centos-webpanel.com/index.php?topic=6889.0

In the official mpm doc said the following;

Code: [Select]
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.

Is there any way to change it ?

Thanks!
« Last Edit: September 19, 2021, 11:40:15 PM by guille »

Offline
*
Re: problem changing mpm to prefork
« Reply #1 on: September 20, 2021, 08:55:16 AM »
try using php-fpm if you need cache/speed for php
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: problem changing mpm to prefork
« Reply #2 on: September 20, 2021, 06:19:35 PM »
Thanks but no, Im trying to use my own custom configuration , but i guess is not possible trough cwp interface , probably i need to make manual cli configurations.

Again... is not possible change the mpm using cwp right ?

Offline
*
Re: problem changing mpm to prefork
« Reply #3 on: September 20, 2021, 08:16:29 PM »
you can probably rebuild apache from cwp or try rebuilding switcher php with DSO handler
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: problem changing mpm to prefork
« Reply #4 on: September 20, 2021, 11:25:30 PM »
thanks i've tried the php swichert rebuild with the DSO support and thinks that modify the httpd behaviour in wrong way.... maybe its glicht in the panel.

the rebuild downloads the original http rpm also the cwp-httpd package still keep installed.... the original http rpm use a different http binary and conf / modules / systemd dirs and files so this broke the most of things.

Code: [Select]
[root@server ~]# /usr/sbin/httpd -V
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 16 2020 16:18:20
Server's Module Magic Number: 20120211:24
Server loaded:  APR 1.6.2, APR-UTIL 1.6.0
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Code: [Select]
[root@server ~]# /usr/local/apache/bin/httpd -V
Server version: Apache/2.4.39 (Unix)
Server built:   May 10 2019 11:45:46
Server's Module Magic Number: 20120211:84
Server loaded:  APR 1.6.2, APR-UTIL 1.6.0
Compiled using: APR 1.6.2, APR-UTIL 1.6.0
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/apache"
 -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

I will trying to rebuild the httpd change and adding the custom options in this text box ( https://pasteboard.co/EE1f8N6fkIFd.png ) but it doesnt look like thats gonna work.

 it would be great thats works in a more native way.