0

Apache: 2.4.23

Configuration http.conf add line:

LoadModule http2_module modules/mod_http2.so

Configuration httpd-vhosts.conf :

<VirtualHost *:80>
DocumentRoot "C:/apache/test7.ru/www"
ServerName test7.ru
Protocols h2c http/1.1
ServerAlias www.test7.ru
ErrorLog "C:/apache/test7.ru/error.log"
CustomLog "C:/apache/test7.ru/access.log" common
</VirtualHost>

But in access.log: HTTP/1.1. what am I doing wrong?

1 Answers1

0

I presume you are connecting from a web browser? If so that won’t work as web browsers only support HTTP/2 over HTTPS (h2) and none support it over plaintext (h2c) for reasons given in this answer. You can see that on caniuse where every browser has a 2 symbol.

So you need to enable HTTPS, Protocol h2. Also most browsers also need decent HTTPS (ALPN Support and strong ciphers) that require OpenSSL 1.0.2 or above.

So h2c is really only useful for back end connections (e.g. if you have Apache as a proxy in front of an App server) but even then I question its usefulness as most of the benefits are for low latency, low bandwidth connections from client to server, rather than high latency, high bandwidth connections that are typical of server to server connections.

Barry Pollard
  • 40,655
  • 7
  • 76
  • 92