Enabling http/2

Nextcloud version: 21.0.0
Operating system and version: Ubuntu 20.04
Apache or nginx version: Apache 2.4.29
PHP version: Php-fpm 7.4.16

Hi there, I tried to switch to Protocols http/2 but it doesn’t seem to work.

Steps I did:

  1. Followed this instruction to install php-fpm: How to enable HTTP/2 support in Apache - HTTP2.Pro
apachectl stop
apt-get install php7.4-fpm # Install the php-fpm from your PHP repository. This package name depends on the vendor.
a2enmod proxy_fcgi setenvif
a2enconf php7.4-fpm # Again, this depends on your PHP vendor.
a2dismod php7.4 # 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
<VirtualHost *:80>
  Protocols h2 http/1.1

Anything to check?

Apache log file doesnt say any related fault. I checked with Mozilla and Chrome but it`s still using http/1.1

Have you activated the http2 Apache mod (a2enmod http2) and restarted Apache?

yep, I did that.

The Guide says something about “cipher configurations” on older TLS versions, but doesn’t go further. How can I check whats needed? I don’t find much information there.
Apache Log says something which is maybe related:

[mpm_event:notice] [pid 5039:tid 140686346587072] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 configured – resuming normal operations

Protocols h2 http/1.1

Have you added this to the vhost config for SSL/TLS connections as well?

The snippet you provided is for port 80 only, but not for port 443.

This is the normal message when Apache is restarted. Nothing to worry about.

nope, I did not. Which is opening a new topic for me. Didn’t work much on that layer. And exploring a bit, it turned out there is no standard solution.
With some combination of information I got that version running, but still no http/2

<VirtualHost *:80>
  ServerName mysite.com
  RewriteEngine On
  RewriteRule ^/?(.*) https://%{SERVER_NAME}:443/$1 [R,L]

<VirtualHost *:443>
    Protocols h2 h2c http/1.1
    ServerName mysite.com

    DocumentRoot "/var/www/nextcloud"