Получение HTTP / 2 Работа с Apache 2.4.29 в Debian 8

I am trying to update my apache2 (Apache/2.4.29 (Debian 8)) server to support http2 but after enabling http2 with following code, it does not work because of mpm_prefork does not support http2

<IfModule http2_module>
    ProtocolsHonorOrder On
    Protocols h2 h2c http/1.1
</IfModule> 

since mpm_prefork apache (2.4.29) does not work with http2, I tried using mpm_event/mpm_worker but it does not work, so I enable mpm_prefork

sudo a2dismod mpm_event 
sudo a2dismod mpm_worker 
sudo a2enmod mpm_prefork

Since I am still running php5
what should I do to have http2 support on Debian8? Will I have to update php5 to php7? Есть ли обходной путь для использования mpm_worker / mpm_event с php5 с поддержкой http2?

журнал ошибок apache

[http2:warn] [pid 11992] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[mpm_prefork:notice] [pid 11992] AH00163: Apache/2.4.29 (Debian) OpenSSL/1.1.0g configured -- resuming normal operations
[core:notice] [pid 11992] AH00094: Command line: '/usr/sbin/apache2'
3
задан 16 December 2017 в 18:03
1 ответ

Лучше перейти на php7. Установите php7.x-fpm и используйте модуль mpm_event (или mpm_worker):

apt-get install php7.x-fpm # install the php-fpm
a2enmod proxy_fcgi
a2enconf php7.x-fpm
a2dismod php7.x # disables mod_php.
a2dismod mpm_prefork
a2enmod mpm_event # enable event MPM. You could also enable mpm_worker.
7
ответ дан 3 December 2019 в 05:11

Теги

Похожие вопросы