How to enable HTTP2 in Apache 2.4 (Ubuntu)


Make sure you have PHP 7.0 or higher with FPM (FastCGI). I will not cover how to do this here.

Change MPM from "prefork" to "event"

(Assuming you're already have the PHP correctly setup)

1. Find out if what MPM configuration you're using

2. Apache official guide explains in more detail why MPM Prefork will not work with HTTP2.

Disable MPM Prefork:

Enable MPM Event:

Restart Apache (command might vary in each setup):

Tell your site's VHOST to use HTTP2

The Virtual Host file of your site should be configured to something like:

Make sure you have the HTTP2 module enabled

Done šŸŽ‰

You should be now set. Open the Chrome DevTools and verify the protocol of the network calls when loading your site.

Leave a Reply

Add <code> Some Code </code> by using this tags.