New server w/ Apache 2.4. How to switch to event MPM?

darkus

Verified User
Joined
Dec 15, 2005
Messages
114
I have a new installation with Apache 2.4 and Im assuming its running the prefork MPM by default.

How do I switch apache to use the event MPM?

Thanks!
 
Anyone know how to do this?

Thanks!

How to do what? To upgrade to CustomBuild 2.0? Or to switch Apache to use the event MPM?

I guess both answers can be found by the link which was already given here by Martynas Bendorius. So upgrade CustomBuild to 2.0, and run

Code:
./build apache

once more time.
 
How to do what? To upgrade to CustomBuild 2.0? Or to switch Apache to use the event MPM?

I guess both answers can be found by the link which was already given here by Martynas Bendorius. So upgrade CustomBuild to 2.0, and run

Code:
./build apache

once more time.

I can upgrade to CB2.0, but Im a bit confused as how to switch to the event MPM. I dont see it discussed in that link?

Thanks!
 
Why? I don't think that it's obligatory.

Hi,

Why we have to use php-fpm for event-mpm ? Do you have any idea about this ? Because on my localserver i'm using mod_php with mpm event.

I want to use event with mod_php is it possible with DirectAdmin ? Currently my php1_release 7.0, php1_mode mod_php, apache_mpm auto and httpd -v return;
Server version: Apache/2.4.18 (Unix)
Server built: Feb 1 2016 01:15:39
Server's Module Magic Number: 20120211:52
Server loaded: APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)

But i want to use apache mpm event.

if i change apache_mpm auto to apache_mpm event is it work ?

Sorry for my bad english. English is not my native language.
 
apache_mpm event is it work ?

Yes, it should work.

Code:
# cd /usr/local/directadmin/custombuild/
# ./build set apache_mpm event
Changed apache_mpm option from auto to event

and build apache:

Code:
# ./build apache
 
Not work for me

After that I build apache and check the httpd-V I got this:

Server version: Apache/2.4.20 (Unix)
Server built: May 22 2016 01:21:49
Server's Module Magic Number: 20120211:57
Server loaded: APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
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="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/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"

My options.conf is:

#PHP Settings
php1_release=7.0
php1_mode=php-fpm
php2_release=no
php2_mode=fastcgi
opcache=no
htscanner=no
php_ini=no
php_timezone=Europe/Budapest
php_ini_type=production
ioncube=no
zend=no
suhosin=no
x_mail_header=yes

#MySQL Settings
mysql=5.6
mariadb=10.0
mysql_inst=mariadb
mysql_backup=yes
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=yes

#WEB Server Settings
webserver=apache
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=event
mod_ruid2=no
userdir_access=yes
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=server.hudns.net
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=4
squirrelmail=no
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=yes
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=yes
suhosin_php_uploadscan=no

#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.4
blockcracking=no
easy_spam_fighter=no
spamassassin=no
sa_update=daily
dovecot=yes
dovecot_conf=yes
pigeonhole=no

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=no

#CustomBuild Settings
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files.directadmin.com

#Cronjob Settings
cron=no
cron_frequency=weekly
[email protected]
notifications=no
da_autoupdate=yes
updates=no
webapps_updates=yes

#CloudLinux Settings
cloudlinux=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=no

ap2/configure.apache

#!/bin/sh
"./configure" \
"--prefix=/etc/httpd" \
"--exec-prefix=/etc/httpd" \
"--bindir=/usr/bin" \
"--sbindir=/usr/sbin" \
"--sysconfdir=/etc/httpd/conf" \
"--enable-so" \
"--enable-dav" \
"--enable-dav-fs" \
"--enable-dav-lock" \
"--enable-suexec" \
"--enable-deflate" \
"--enable-unique-id" \
"--enable-cgi" \
"--disable-cgid" \
"--enable-mods-static=most" \
"--enable-mpms-shared=all" \
"--enable-nonportable-atomics=yes" \
"--with-mpm=event" \
"--with-suexec-safedir=/usr/local/safe-bin" \
"--with-suexec-caller=apache" \
"--with-suexec-docroot=/" \
"--with-suexec-gidmin=100" \
"--with-suexec-logfile=/var/log/httpd/suexec_log" \
"--with-suexec-uidmin=100" \
"--with-suexec-userdir=public_html" \
"--with-suexec-bin=/usr/sbin/suexec" \
"--with-included-apr" \
"--with-pcre=/usr/local" \
"--includedir=/usr/include/apache" \
"--libexecdir=/usr/lib/apache" \
"--libdir=/usr/lib/apache" \
"--mandir=/usr/share/man" \
"--datadir=/var/www" \
"--localstatedir=/var" \
"--enable-logio" \
"--enable-ssl" \
"--enable-rewrite" \
"--enable-proxy" \
"--enable-expires" \
"--enable-reqtimeout" \
"--with-ssl=/usr" \
"--enable-headers"

uname -a
Linux server.name 2.6.32-042stab113.17 #1 SMP Wed Feb 10 18:31:00 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux

CentOS release 6.8 (Final)

Any idea what is wrong?
 
Back
Top