2

Today, I ran an upgrade as every week of my Debian web server.

I was greeted with message:

apache2 (2.4.25-3+deb9u5) stretch; urgency=medium
 * This package upgrades mod_http2 to the version from apache2 2.4.33. This
   fixes a lot of bugs and some security issues, but it also removes the
   support for using HTTP/2 when running with mpm_prefork. HTTP/2 support
   is only provided when running with mpm_event or mpm_worker.
-- Stefan Fritsch <sf@debian.org>  Sat, 02 Jun 2018 09:51:46 +0200

Which surprised me, because I use HTTP/2 on my server. I tested my server on SSL Labs, and really the HTTP/2 is gone.

How do I remedy it supposing I use the official Apache and PHP 7.0 packages?

1 Answers1

3

In my case I applied the following as root to get it running again:

# enable these mods
a2enmod proxy_fcgi setenvif

# disable standard PHP module
a2dismod php7.3

# if you don't have FPM already installed
apt-get install php7.3-fpm

# query the MPM
a2query -M

If you see prefork or worker, you need to continue with the following steps. If you see event, you can skip the next 2 steps.

# disable the prefork / worker MPM (only one MPM can run at a time)
a2dismod mpm_prefork mpm_worker

# enable event MPM
a2enmod mpm_event

# start and enable the FastCGI Process Manager
systemctl start php7.3-fpm && systemctl enable php7.3-fpm

# enable the FastCGI Process Manager configuration
a2enconf php7.3-fpm

# start Apache2 web server
systemctl restart apache2

Tested to be working on GNU/Linux Debian 10 Buster on 2019-Apr-11.


Now, you can finally enable the HTTP/2 through ALPN.

You can do this globally for all of your sites in this file:

/etc/apache2/apache2.conf

With the following directive:

Protocols h2 http/1.1