Skip to main content

Set http 2 with php

For setup http/2 on apache with php installed, set apache with php-fpm

For example on debian server:

apachectl stop
apt-get install php7.3-fpm # Install the php-fpm from your PHP repository. This package name depends on the vendor.
a2enmod proxy_fcgi setenvif
a2enconf php7.3-fpm # Again, this depends on your PHP vendor.
a2dismod php7.3 # This disables mod_php.
a2dismod mpm_prefork # This disables the prefork MPM. Only one MPM can run at a time.
a2enmod mpm_event # Enable event MPM. You could also enable mpm_worker.
apachectl start

Source

How to enable HTTP/2 support in Apache