I'm running Apache 2.4.20 on Ubuntu and I have SSL configured. I have a SAN SSL Certificate and www.example.com and www2.example.com are sharing the same certificate.
I'm getting a 421 Misdirected Request error when I include the following:
Protocols h2 h2c http/1.1
H2Upgrade on
H2Direct
H2WindowSize 128000
Websites run normally if I remove them.
I'm getting the error if ON THE SAME BROWSER, www.example.com and www2.example.com are opened. If I go to www.example.com first then it will load properly. I get the error when I load a second site from that SAN SSL Certificate, like www2.example.com. It does not matter what site I go to first. It always responds with the 421 Misdirected Request on the second site.
What is wrong with my use of the HTTP/2 directives? (They are in the VirtualHost by the way)
Or is there an issue with HTTP/2 and SAN SSL implementations?
And if it matters, both www.example.com and www2.example.com are on the same server hosted in AWS.
Thanks.
EDIT:
I also tried the settings below with the same results.
Protocols h2 http/1.1
H2Direct
H2WindowSize 128000
In the SSL Config
<IfModule mod_ssl.c>
SSLRandomSeed startup builtin
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog exec:/usr/share/apache2/ask-for-passphrase
SSLSessionCache shmcb:${APACHE_RUN_DIR}/ssl_scache(512000)
SSLSessionCacheTimeout 300
SSLOpenSSLConfCmd DHParameters "/path/dhparams.pem"
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder on
SSLCompression Off
SSLSessionTickets Off
SSLUseStapling On
SSLStaplingResponderTimeout 5
SSLStaplingReturnResponderErrors off
SSLStaplingCache shmcb:${APACHE_RUN_DIR}/ssl_stapling(32768)
SSLProtocol all -SSLv3
SSLInsecureRenegotiation Off
SSLStrictSNIVHostCheck Off
</IfModule>
In the VirtualHost
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin mail@example.com
ServerName www.example.com
DocumentRoot /path/path
Protocols h2 http/1.1
H2Direct on
H2WindowSize 128000
SSLEngine on
SSLCACertificateFile /path/cert.crt
SSLCertificateFile /path/cert.crt
SSLCertificateKeyFile /path/key.key
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
<Directory /path/path>
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
</IfModule>