On peut mettre dans :

  • /etc/apache2/conf.d/http2.conf
H2ModernTLSOnly on
Protocols h2 h2c http/1.1
  • /etc/apache2/sites-enable/default-ssl.conf
<VirtualHost *:443>
        ServerName www.example.net
        ServerAdmin webmaster@localhost

        H2EarlyHints on

        DocumentRoot /var/www/
        Header always set Strict-Transport-Security "max-age=15552001; includeSubdomains;"

        LogLevel warn
        ErrorLog ${APACHE_LOG_DIR}/error_.log
        CustomLog ${APACHE_LOG_DIR}/access_.log combined

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/example.net-0001/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/example.net-0001/privkey.pem

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        <Directory /var/www/>
                Options FollowSymLinks MultiViews 
                Options -Indexes
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        <Directory /var/www/h/>
                <FilesMatch "\.html$">
        H2PushResource "/h/assets/css/common.css" critical
        H2PushResource "/h/images/profile.png" critical
        H2PushResource "/h/theme/pygments/github.min.css" critical
        H2PushResource "/h/theme/stylesheet/style.min.css" critical
                </FilesMatch>
        </Directory>

</VirtualHost>