ERR_EMPTY_RESPONSE 激活时 mpm_event

ERR_EMPTY_RESPONSE when active mpm_event

我尝试在我的 Apache (OS Debian 9 ) 上激活 mpm_event 并在我的站点上禁用 mpm_prefork 以激活 http/2
但是当我这样做时,我的网站出现故障并在浏览器上显示 ERR_EMPTY_RESPONSE

我曾经执行过以下命令:

sudo apt-get install php7.4-fpm
sudo a2enmod proxy_fcgi
sudo a2dismod php7.4
sudo a2enconf php7.4-fpm
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo service apache2 restart

在 apache 日志中我只看到这个错误:

AH00052: child pid 27520 exit signal Aborted (6)

有谁知道我应该怎么做才能解决这个问题?

我发现问题是因为 Mod_Ruid2 与 PHP_fpm 冲突。

当我禁用 Mod_Ruid2 时,网站已备份并且 运行 没有任何问题。

a2dismod ruid2

The purpose of mod_ruid2 is to allow run of scripts with the users permission when Apache is using mod_php. In that mode Apache is ran with root and child processes are being setuid-ed to the proper user so they can't touch other user files.

The php-fpm is completely different approach. With php-fpm the apache does not compile php scripts - everything is done by external binary (called php-fpm). Therefore there is absolutely no need for mod_ruid2 when you are using php-fpm.

https://forum.directadmin.com/threads/php-fpm-and-mod_ruid2-with-php7-1.56552/

https://forum.vestacp.com/viewtopic.php?t=16041