如何在ubuntu 13.10上启用apache2-mpm-worker?

我正在尝试为apache2启用apache2-mpm-worker,但没有运气。 什么是安装和启用apache2 mpm-ubuntu 13.10的过程? 有一些隐藏的设置说服不同的Apache?

Server version: Apache/2.4.6 (Ubuntu) Server built: Mar 19 2014 20:56:01 Server's Module Magic Number: 20120211:23 Server loaded: APR 1.4.8, APR-UTIL 1.5.2 Compiled using: APR 1.4.8, APR-UTIL 1.5.2 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="/etc/apache2" -D SUEXEC_BIN="/usr/lib/apache2/suexec" -D DEFAULT_PIDLOG="/var/run/apache2.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="mime.types" -D SERVER_CONFIG_FILE="apache2.conf" # uname -a Linux Ubuntu-1310-saucy-64-minimal 3.11.0-19-generic #33-Ubuntu SMP Tue Mar 11 18:48:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 

Apache说,还没有worker.c

 # /usr/sbin/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 

安装进行顺利

 # sudo apt-get install apache2-mpm-worker Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2 Suggested packages: apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils The following NEW packages will be installed: apache2 apache2-mpm-worker 0 upgraded, 2 newly installed, 0 to remove and 25 not upgraded. Need to get 0 B/88.0 kB of archives. After this operation, 488 kB of additional disk space will be used. Do you want to continue [Y/n]? Selecting previously unselected package apache2. (Reading database ... 112810 files and directories currently installed.) Unpacking apache2 (from .../apache2_2.4.6-2ubuntu2.2_amd64.deb) ... Selecting previously unselected package apache2-mpm-worker. Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.4.6-2ubuntu2.2_amd64.deb) ... Processing triggers for ureadahead ... Processing triggers for ufw ... Processing triggers for man-db ... Setting up apache2 (2.4.6-2ubuntu2.2) ... * Restarting web server apache2 [ OK ] Setting up apache2-mpm-worker (2.4.6-2ubuntu2.2) ... 

apache2-mpm-worker包只是一个依赖于apache2包的过渡包。 该软件包包含了构build为dso模块的prefork,worker,itk和event MPM。

你可以看到他们在mods可用

 $ ls /etc/apache2/mods-available/mpm* /etc/apache2/mods-available/mpm_event.conf /etc/apache2/mods-available/mpm_prefork.conf /etc/apache2/mods-available/mpm_event.load /etc/apache2/mods-available/mpm_prefork.load /etc/apache2/mods-available/mpm_itk.conf /etc/apache2/mods-available/mpm_worker.conf /etc/apache2/mods-available/mpm_itk.load /etc/apache2/mods-available/mpm_worker.load 

并在mods-enabled中看到活动

 $ ls -l /etc/apache2/mods-enabled/mpm* lrwxrwxrwx 1 root root 32 Mar 25 21:09 /etc/apache2/mods-enabled/mpm_event.conf -> ../mods-available/mpm_event.conf lrwxrwxrwx 1 root root 32 Mar 25 21:09 /etc/apache2/mods-enabled/mpm_event.load -> ../mods-available/mpm_event.load 

您可以使用a2dismoda2enmod禁用和启用模块。

你可能想要坚持事件而不是工人 。