Enabling HTTP/2

aptitude or apt-get


aptitude install php-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.3-fpm

#Lets enable mpm_event

a2dismod php7.3
a2dismod mpm_prefork
a2enmod mpm_event

/etc/init.d/apache2 restart

a2enmod http2

Browsers don't support http2 protocol unless its over TLSv1.2. You can disable older version of encryption if you would like. 
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1


Few Errors that came up. The order above fixes the issues.

a2enmod mpm_event
Considering conflict mpm_worker for mpm_event:
Considering conflict mpm_prefork for mpm_event:
ERROR: Module mpm_prefork is enabled – cannot proceed due to conflicts. It needs to be disabled first!

a2dismod mpm_prefork
ERROR: The following modules depend on mpm_prefork and need to be disabled first: php7.



References:

https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534

https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534

Leave a comment

Your email address will not be published. Required fields are marked *