r/apache • u/Snoo_61639 • 1d ago
Discussion Apache HTTP/2
How do you know if the VM is running apache with HTTP/2 enabled?
Upon running the httpd -M | grep http2 , only AH00558 error is the output.
Thanks in advance for the guidance.
1
u/AyrA_ch 14h ago edited 14h ago
Looking in the config is one way to do it, but the config does not necessarily represent the reality. You can execute curl -vI --http2-prior-knowledge https://vm-hostname/ (also works with plain http)
This will make a HTTP 2 request, and aborts if the server does not support it. If your SSL certificate is not trusted, you can add -k to the command line
If http2 is supported, you get a valid response, otherwise curl will abort using a message like "http2 error: Remote peer returned unexpected data while we expected SETTINGS frame. Perhaps, peer does not support HTTP/2 properly"
2
u/shelfside1234 20h ago
grep the httpd.conf file check for:
Protocols h2
Also the access log should have the protocol used