nativeInstallerneos

Enable HTTP/2 support with Apache

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and Mac OS X) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). Learn more.

Bitnami stacks ship with the mod_http2 module installed, but it is not enabled by default. To enable this module, follow these instructions. Once the module is active, follow the steps below:

  • Add the following lines in the default Apache virtual host configuration file at installdir/apache2/conf/bitnami/bitnami.conf, inside the default VirtualHost directives, so that it looks like this:

    <VirtualHost _default_:80>
      ...
      Protocols h2 h2c http/1.1
    </VirtualHost>
    
    ...
    
    <VirtualHost _default_:443>
      ...
      Protocols h2 h2c http/1.1
    </VirtualHost>
    

    Repeat the above change for any other virtual hosts you may have defined.

  • After modifying the Apache configuration files, restart Apache to apply the changes.

    $ sudo installdir/ctlscript.sh restart apache