Apache http2.conf configuration example for Debian GNU/Linux 11 (bullseye)

Get the default configuration file http2.conf for Apache, optimized for Debian GNU/Linux 11 (bullseye). This example configuration ensures optimal compatibility and performance for Apache, making it easy to set up and adjust to meet your needs.

Find and download the configuration file here: /etc/apache2/mods-available/http2.conf.

For more configurations and setup guides, visit our related files section to further customize your system.

    
# mod_http2 doesn't work with mpm_prefork
<IfModule !mpm_prefork>
    Protocols h2 h2c http/1.1

    # # HTTP/2 push configuration
    # 
    # H2Push          on
    # 
    # # Default Priority Rule
    # 
    # H2PushPriority * After 16
    # 
    # # More complex ruleset:
    # 
    # H2PushPriority  *                       after
    # H2PushPriority  text/css                before
    # H2PushPriority  image/jpeg              after   32
    # H2PushPriority  image/png               after   32
    # H2PushPriority  application/javascript  interleaved
    # 
    # # Configure some stylesheet and script to be pushed by the webserver
    # 
    # <FilesMatch "\.html$">
    #     Header add Link "</style.css>; rel=preload; as=style"
    #     Header add Link "</script.js>; rel=preload; as=script"
    # </FilesMatch>
    # Since mod_http2 doesn't support the mod_logio module (which provide the %O format),
    # you may want to change your LogFormat directive as follow:
    #
    # LogFormat "%v:%p %h %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    # LogFormat "%h %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" combined
    # LogFormat "%h %l %u %t \"%r\" %>s %B" common
</IfModule>

    
  

Config Details

Location
/etc/apache2/mods-available/http2.conf
Operating system
Debian GNU/Linux 11 (bullseye)
Length
34 lines
MD5 checksum
1d8bfa43825ea9c16b6180452336ba11

Usage

Download the raw file with wget or curl

Wget

wget -O http2.conf.example https://exampleconfig.com/static/raw/apache/debian11/etc/apache2/mods-available/http2.conf

cURL

curl https://exampleconfig.com/static/raw/apache/debian11/etc/apache2/mods-available/http2.conf > http2.conf.example