将Apache MPM从prefork更改为worker [英] Change Apache MPM from prefork to worker

查看:230
本文介绍了将Apache MPM从prefork更改为worker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将MPM prefork模块更改为worker,但是它在我的Debian 9.1上不起作用.当我启用工作程序模块时,PHP无法正常工作.我无法启用php7.0模块.

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.

这是控制台的输出:

root @ Debian-91-stretch-64-LAMP〜#apachectl -V | grep -i mpm

root@Debian-91-stretch-64-LAMP ~ # apachectl -V | grep -i mpm

AH00558:apache2:无法可靠地使用2a01:4f8:171:fc2 :: 2确定服务器的标准域名.全局设置"ServerName"指令以禁止显示此消息

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

服务器MPM:前叉

root @ Debian-91-stretch-64-LAMP〜#a2enmod mpm_worker

root@Debian-91-stretch-64-LAMP ~ # a2enmod mpm_worker

考虑mmp_worker的冲突mpm_event: 考虑mpm_worker的mpm_prefork冲突: 错误:模块mpm_prefork已启用-由于冲突而无法继续.首先需要禁用它!

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

root@Debian-91-stretch-64-LAMP ~ # a2dismod mpm_prefork

错误:以下模块取决于mpm_prefork,需要首先禁用:php7.0 root @ Debian-91-stretch-64-LAMP〜#a2dismod php7.0 php7.0模块已禁用.

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重新启动apache2

systemctl restart apache2

root @ Debian-91-stretch-64-LAMP〜#a2dismod php7.0

root@Debian-91-stretch-64-LAMP ~ # a2dismod php7.0

模块php7.0禁用.

Module php7.0 disabled.

要激活新配置,您需要运行:

To activate the new configuration, you need to run:

systemctl重新启动apache2

systemctl restart apache2

root @ Debian-91-stretch-64-LAMP〜#a2enmod mpm_worker

root@Debian-91-stretch-64-LAMP ~ # a2enmod mpm_worker

考虑mmp_worker的冲突mpm_event:

Considering conflict mpm_event for mpm_worker:

考虑到mpm_worker的冲突mpm_prefork:

Considering conflict mpm_prefork for mpm_worker:

启用模块mpm_worker.

Enabling module mpm_worker.

要激活新配置,您需要运行:

To activate the new configuration, you need to run:

systemctl重新启动apache2

systemctl restart apache2

root @ Debian-91-stretch-64-LAMP〜#a2enmod php7.0

root@Debian-91-stretch-64-LAMP ~ # a2enmod php7.0

考虑对php7.0的依赖性mpm_prefork:

Considering dependency mpm_prefork for php7.0:

考虑将mpm_prefork冲突为mpm_event:

Considering conflict mpm_event for mpm_prefork:

考虑将mpm_worker与mpm_prefork冲突:

Considering conflict mpm_worker for mpm_prefork:

错误:模块mpm_worker已启用-由于冲突而无法继续.首先需要禁用它!

ERROR: Module mpm_worker is enabled - cannot proceed due to conflicts. It needs to be disabled first!

错误:无法为php7.0启用依赖项mpm_prefork,正在中止

ERROR: Could not enable dependency mpm_prefork for php7.0, aborting

推荐答案

我遇到了以下错误

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆