Context
I try to enable HTTP/2
through my nginx configurations:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name stg.grozissaviems.lt;
ssl_certificate /etc/nginx/certs/stg.grozissaviems.lt.crt;
ssl_certificate_key /etc/nginx/certs/stg.grozissaviems.lt.key;
ssl_protocols TLSv1.2;
}
Issue
When I run curl -I -L https://stg.grozissaviems.lt
to debug HTTP/2
:
through my laptop terminal (MacOS) I see
HTTP/1.1 200 OK Server: nginx/1.21.1 Date: Mon, 26 Sep 2022 08:11:07 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Vary: Accept-Encoding X-Powered-By: PHP/8.0.23 Cache-Control: max-age=0, must-revalidate, private pragma: no-cache Expires: Mon, 26 Sep 2022 08:11:07 GMT Link: </build/fonts/Quicksand-Bold.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-Light.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-Medium.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-Regular.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-SemiBold.ttf>; rel="preload"; as="font" Strict-Transport-Security: max-age=31536000
through my VPS terminal (Ubuntu) I see
HTTP/2 200 server: nginx/1.21.1 date: Mon, 26 Sep 2022 08:11:36 GMT content-type: text/html; charset=UTF-8 vary: Accept-Encoding x-powered-by: PHP/8.0.23 cache-control: max-age=0, must-revalidate, private pragma: no-cache expires: Mon, 26 Sep 2022 08:11:36 GMT link: </build/fonts/Quicksand-Bold.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-Light.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-Medium.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-Regular.ttf>; rel="preload"; as="font",</build/fonts/Quicksand-SemiBold.ttf>; rel="preload"; as="font" strict-transport-security: max-age=31536000
When I debug it using this KeyCDN tool I see:
HTTP/2 protocol is supported.
ALPN extension is supported.
When I access the website using Google Chrome, in the Network tab I see:
stg.grozissaviems.lt 200 http/1.1
Quicksand-Bold.ttf 200 http/1.1
Why does it differ?
CodePudding user response:
I finally found the issue. According to this answer:
You are using anti-virus software and it is MITM your traffic and so downgrading you to HTTP/1.1. ...
I did turn my anti-virus off and I could finally see HTTP/2
in the Networks tab!
In case someone stumbles upon my question and turning anti-virus software does not help, check this answer for more solutions.