How to Enable HTTP/2 in Apache Web Server

I was looking into using HTTP/2 and followed the instructions found here:

How to enable

I used the Apache interface to turn “off” pm_prefork and php_7.4, and “on” mpm_event. As described. But after doing this Apache refuses to start!

Gave an error message about php_admin_value not being used.

Is there a more official way of doing this via Virtualmin? I felt as if I was about to fall into that famous “rabbit hole” …

I also got the impression that if you are using fpm, then the php_7.4 could be off. Is that correct?

Nigel.

Here is an interesting discussion about it:

https://www.virtualmin.com/node/58688

As long as Apache and OpenSSL are new enough (and they probably are with Debian or Ubuntu releases supported by Virtualmin), enabling http/2 should just be a matter of loading the http2 module and adding Protocols h2 h2c http/1.1 to the main Apache config. Make sure only one MPM module is loading, either worker or event.

The error about php_admin_value suggests the mod_php module was loading at one time but no longer is, which is what you want. See if commenting-out that line in your Apache config gets Apache server to start.

1 Like

@ramin @calport,

Thank you for your assistance. It gave me a level of certainty that this would not be as hard as I was worried about! I made all the changes, and it worked “out of the box”!

I’m now seeing …

nigel-aves-photography.com

HTTP/2 protocol is supported.

ALPN extension is supported.

Once more, thanks for the support. Nigel.

p.s. I found it interesting that andreychek on Fri, 09/07/2018 mentioned they would start looking into this! I guess they are still looking :slight_smile:

That’s wonderful, @NigelAves. Did you tweak settings in Virtualmin to enable HTTP/2 for just this one website / virtual server or were you able to configure Virtualmin server templates such that HTTP/2 is enabled for any new virtual servers which are created henceforth?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.