HTTP2 not working on LAMP droplet with Ubuntu 20.04

Posted October 13, 2021 99 views
ApacheLAMP StackUbuntu 20.04

I followed the following steps to configure my LAMP droplet:

  1. Install LAMP with Ubuntu 20.04 -
  2. Create non-root user:
  3. Create virtual host: 4: Install LetsEncrypt:
  4. Enable http2:

Enabling http2 should be straight forward by enabling it with the following command:
a2enmod http2

And adding this to the virtual host file:
Protocols h2 http/1.1

When I test my website( for http2 support on I get the following error:

  • HTTP/2 protocol is not supported.
  • ALPN extension is not supported.

Any ideas what I could try next to get it to work?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


I’ve just tested this and it seems to be working as expected:

Would you mind sharing here with the community how did you get this fixed?

Usually, if the configuration s done correctly, you would need to restart Apache after the change as well.

  • Hi! Yes, let me explain how I fixed it.

    In my error log I had the following error: “The mpm module (prefork.c) is not supported by mod_http2.”

    This can be fixed by installing the php-fpm package.

    apachectl stop
    apt-get install php8.0-fpm # Change PHP version to your version
    a2enmod proxy_fcgi setenvif
    a2enconf php8.0-fpm # Change PHP version to your version
    a2dismod php8.0 # This disables mod_php. Change PHP version to your version
    a2dismod mpm_prefork # This disables the prefork MPM. In the following you will switch to php-fpm
    a2enmod mpm_event # Enable event MPM. 
    apachectl start

    I found the answer here:

    edited by bobbyiliev