Change Apache MPM from prefork to worker(将 Apache MPM 从 prefork 更改为 worker)
问题描述
I need to change MPM prefork module to worker but it's not working on my Debian 9.1. When I enable worker module, PHP is not working. I can't enable php7.0 module back.
Here is the output from console:
root@Debian-91-stretch-64-LAMP ~ # apachectl -V | grep -i mpm
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 2a01:4f8:171:fc2::2. Set the 'ServerName' directive globally to suppress this message
Server MPM: prefork
root@Debian-91-stretch-64-LAMP ~ # a2enmod mpm_worker
Considering conflict mpm_event for mpm_worker: Considering conflict mpm_prefork for mpm_worker: ERROR: Module mpm_prefork is enabled - cannot proceed due to conflicts. It needs to be disabled first!
root@Debian-91-stretch-64-LAMP ~ # a2dismod mpm_prefork
ERROR: The following modules depend on mpm_prefork and need to be disabled first: php7.0 root@Debian-91-stretch-64-LAMP ~ # a2dismod php7.0 Module php7.0 disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
root@Debian-91-stretch-64-LAMP ~ # a2dismod php7.0
Module php7.0 disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
root@Debian-91-stretch-64-LAMP ~ # a2enmod mpm_worker
Considering conflict mpm_event for mpm_worker:
Considering conflict mpm_prefork for mpm_worker:
Enabling module mpm_worker.
To activate the new configuration, you need to run:
systemctl restart apache2
root@Debian-91-stretch-64-LAMP ~ # a2enmod php7.0
Considering dependency mpm_prefork for php7.0:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
ERROR: Module mpm_worker is enabled - cannot proceed due to conflicts. It needs to be disabled first!
ERROR: Could not enable dependency mpm_prefork for php7.0, aborting
I got the following error
sudo a2enmod php7.2
Considering dependency mpm_prefork for php7.2:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php7.2, aborting
And to fix I simply did
sudo a2dismod mpm_event
sudo a2enmod php7.2
sudo systemctl restart apache2
you might also want to try restarting your server
这篇关于将 Apache MPM 从 prefork 更改为 worker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 Apache MPM 从 prefork 更改为 worker
基础教程推荐
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01