title: HTTP2 is available but server refuses to use it why it may be?
body: <p>I have successfully set up http2 for my virtual host but when I try to access the url via curl it looks like server refuses connection over http2 and accepts http1. Can anyone explain why it may be? and how can I tell my server to use http2 in the first place. </p>
  
  <p>Below is the curl output of the site I am trying to configure http2 for.</p>
  
  <pre><code>* Rebuilt URL to: https://example.com/
  *   Trying 172.24.112.31...
  * TCP_NODELAY set
  * Connected to example.com (172.24.112.31) port 443 (#0)
  * ALPN, offering h2
  * ALPN, offering http/1.1
  * successfully set certificate verify locations:
  *   CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: none
  } [5 bytes data]
  * TLSv1.2 (OUT), TLS handshake, Client hello (1):
  } [221 bytes data]
  * TLSv1.2 (IN), TLS handshake, Server hello (2):
  { [112 bytes data]
  * TLSv1.2 (IN), TLS handshake, Certificate (11):
      { [2426 bytes data]
  * TLSv1.2 (IN), TLS handshake, Server key exchange (12):
  { [300 bytes data]
  * TLSv1.2 (IN), TLS handshake, Server finished (14):
  { [4 bytes data]
  * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
  } [37 bytes data]
  * TLSv1.2 (OUT), TLS change cipher, Client hello (1):
  } [1 bytes data]
  * TLSv1.2 (OUT), TLS handshake, Finished (20):
  } [16 bytes data]
  * TLSv1.2 (IN), TLS handshake, Finished (20):
  { [16 bytes data]
  * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
  * ALPN, server accepted to use http/1.1
  * Server certificate:
  *  subject: OU=Domain Control Validated; CN=*.example.com
  *  start date: Jun  9 09:24:31 2016 GMT
  *  expire date: Jun 10 09:24:31 2019 GMT
  *  subjectAltName: host "example.com" matched cert's     "*.example.com"
  *  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Domain Validation CA - SHA256 - G2
  *  SSL certificate verify ok.
  } [5 bytes data]
  &gt; GET / HTTP/1.1
  &gt; Host: example.com
  &gt; User-Agent: curl/7.58.0
  &gt; Accept: */*
  &gt; 
  { [5 bytes data]
  &lt; HTTP/1.1 302 Found
  &lt; Date: Thu, 08 Mar 2018 08:54:23 GMT
  &lt; Server: Apache/2.4.29 (Ubuntu)
  &lt; Location: https://example.com
  &lt; Content-Length: 315
  &lt; Content-Type: text/html; charset=iso-8859-1
  &lt; 
  { [315 bytes data]
  * Connection #0 to host example.com left intact
  </code></pre>
  
  <p>Below two lines are of my focus here,</p>
  
  <pre><code>* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
  * ALPN, server accepted to use http/1.1
  </code></pre>
  
  <p>even though http2 is available it is not used by server but http1.1 is used. 
  Please help me to understand this and configure http2 the right way.</p>
  
  <p>Thanks!</p>