Не удается заставить MPM Worker работать ..
Я установил php-zts
пакет, без комментариев #HTTPD=/usr/sbin/httpd.worker
в /etc/sysconfig/httpd
и перезапустили службу httpd.
распечатка httpd:
[root@web06 ~]# httpd -V
Server version: Apache/2.2.3
Server built: Sep 3 2009 17:38:51
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-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=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Апач:
[root@web06 ~]# apachectl -v
Server version: Apache/2.2.3
Server built: Sep 3 2009 17:41:45
[root@web06 ~]# apachectl -l
Compiled in modules:
core.c
worker.c
http_core.c
mod_so.c
Детали сервера:
Linux web 2.6.18-164.15.1.el5PAE #1 SMP Wed Mar 17 12:14:29 EDT 2010 i686 i686 i386 GNU/Linux
Почему https все еще работает в режиме предварительной вилки?
Я чувствую, что скучаю по чему-то очень важному ...
Спасибо!
ИЗМЕНИТЬ 1
[root@web06 ~]# ps -ef | grep httpd
apache 4366 14700 0 05:44 ? 00:00:34 /usr/sbin/httpd
apache 9239 14700 0 06:07 ? 00:00:22 /usr/sbin/httpd
apache 9260 14700 0 06:07 ? 00:00:23 /usr/sbin/httpd
apache 9271 14700 0 06:07 ? 00:00:23 /usr/sbin/httpd
apache 9288 14700 0 06:07 ? 00:00:22 /usr/sbin/httpd
apache 9337 14700 0 06:07 ? 00:00:23 /usr/sbin/httpd
root 14700 1 0 Aug08 ? 00:00:00 /usr/sbin/httpd
apache 14702 14700 0 Aug08 ? 00:00:00 /usr/sbin/httpd
apache 22445 14700 0 06:57 ? 00:00:04 /usr/sbin/httpd
apache 22480 14700 0 06:57 ? 00:00:04 /usr/sbin/httpd
apache 27910 14700 0 07:10 ? 00:00:00 /usr/sbin/httpd
apache 27917 14700 0 07:10 ? 00:00:00 /usr/sbin/httpd
root 27948 9898 0 07:11 pts/2 00:00:00 grep httpd
РЕДАКТИРОВАТЬ 2
[root@web06 ~]# ls -l /usr/sbin/httpd*
-rwxr-xr-x 1 root root 315284 Sep 3 2009 /usr/sbin/httpd
-rwxr-xr-x 1 root root 327708 Sep 3 2009 /usr/sbin/httpd.event
-rwxr-xr-x 1 root root 327708 Sep 3 2009 /usr/sbin/httpd.worker
[root@web06 ~]# cat /var/log/httpd/error_log
[Thu Aug 09 07:26:14 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t
[Thu Aug 09 07:26:14 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 09 07:26:14 2012] [notice] Digest: done
[Thu Aug 09 07:26:14 2012] [notice] mod_python: Creating 4 session mutexes based on 6 max processes and 25 max threads.
[Thu Aug 09 07:26:14 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
РЕДАКТИРОВАТЬ 3
[root@web06 conf]# grep '/etc/sysconfig/httpd' /etc/init.d/httpd
# config: /etc/sysconfig/httpd
if [ -f /etc/sysconfig/httpd ]; then
. /etc/sysconfig/httpd
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
РЕДАКТИРОВАТЬ 4
Выход sh -x /etc/init.d/httpd start > /tmp/apache.debug 2>&1
РЕДАКТИРОВАТЬ 5
После выполнения команд @quanta:
[root@web06 ~]# ps -ef | grep httpd
root 16303 1 0 08:29 ? 00:00:00 /usr/sbin/httpd.worker
apache 16305 16303 2 08:29 ? 00:00:37 /usr/sbin/httpd.worker
apache 16307 16303 2 08:29 ? 00:00:35 /usr/sbin/httpd.worker
root 20415 20381 0 08:56 pts/1 00:00:00 grep httpd
Не знаю, почему первая проверка ps -ef | grep httpd
все еще показывает /usr/sbin/httpd
но поскольку в отладке я вижу следующее:
+ /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/httpd.worker'
...
+ success 'httpd.worker startup'
Я почти уверен, что ваш Apache работает в рабочем режиме, и вторая проверка доказывает, что:
[root@web06 ~]# ps -ef | grep [h]ttpd
root 16303 1 0 08:29 ? 00:00:00 /usr/sbin/httpd.worker
apache 16305 16303 2 08:29 ? 00:00:37 /usr/sbin/httpd.worker
apache 16307 16303 2 08:29 ? 00:00:35 /usr/sbin/httpd.worker
НЕ использовать httpd -V
чтобы проверить режим, в котором работает Apache, потому что:
# which httpd
/usr/sbin/httpd
Использовать apachectl -V
(в верхнем регистре) вместо:
Server version: Apache/2.2.3
Server built: Oct 20 2011 17:03:44
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 64-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker"
-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=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-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"
или /server-info
:
$ lynx -dump http://yourdomain.com/server-info | grep -i mpm
MPM Name: Worker
MPM Information: Max Daemons: 1 Threaded: yes Forked: yes
Server Built With: -D APACHE_MPM_DIR="server/mpm/prefork" -D
AcceptMutex - Valid accept mutexes for this platform and MPM