HTTP/2 does not seem to be running after what seems to be a proper installation.
I am running CentOS 7.
I installed the latest version of Apache, version httpd-2.4.35-5.el7.x86_64, and have been trying to get HTTP/2 working.
For this, I see that we need to have http2_module running. That is active and running. I believe to have confirmed this by running the command httpd -M
. http2_module (shared) is listed under those modules.
The next thing I know to do is add in Protocols h2 h2c http/1.1
above the <VirtualHost ...>
tag. I have done that as well.
Finally, I have CURLed my URL, and I am still getting HTTP/1.1.
CURL command: curl -vsko /dev/null --http2 https://www.thehomepainter.com
Brief response from the CURL:
GET / HTTP/1.1 Host: www.thehomepainter.com User-Agent: curl/7.64.0 Accept: /
< HTTP/1.1 200 OK
Partial from httpd.conf
Protocols h2 h2c http/1.1
<VirtualHost *:443>
SSLEngine on
ServerAdmin ### omitted ###
ServerName thehomepainter.com
ServerAlias www.thehomepainter.com
DocumentRoot /var/www/html/
Options -Indexes
ProxyRequests off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
ProxyPass "/" "http://localhost:3000/"
ProxyPassReverse "/" "http://localhost:3000/"
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile ### omitted ###
SSLCertificateKeyFile ### omitted ###
SSLCertificateChainFile ### omitted ###
# i have tried this here as well
# Protocols h2 h2c http/1.1
</VirtualHost>
Protocols h2 h2c http/1.1
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName thehomepainter.com
ServerAlias www.thehomepainter.com
DocumentRoot /var/www/html
RewriteEngine on
RewriteCond %{SERVER_NAME} =thehomepainter.com [OR]
RewriteCond %{SERVER_NAME} =www.thehomepainter.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
# i have tried this here as well
# Protocols h2 h2c http/1.1
</VirtualHost>
So the expected result is for HTTP/2 to work. However, it is not and I have no idea why.