Enable HTTP2 on Nginx

Is there a need for me to edit my NGINX setting to
listen 443 ssl http2;

the default is

listen 443 ssl;

I understand that Cloudflare has setting to push for http2 , but not sure if there’s a need to set http2 on my nginx configuration.

In fact i’ve already enabled HTTP/3 on Cloudflare, not sure if i should be configuring my nginx to HTTP/3 , would it improve the performance.

Historically Cloudflare has only supported HTTP/1.1 to your origin, but recently there has been some movement in Cloudflare supporting HTTP/2 to origin.

Enabling HTTP/2 on your origin may result in faster responses (especially with multiple requests) when handling any uncached assets, and it’s basically a one-line change for any modern nginx version.

For more information: https://support.cloudflare.com/hc/en-us/articles/200168076-Understanding-Cloudflare-HTTP-2-and-HTTP-3-Support

1 Like

Won’t hurt to enable http2 listen directive on Nginx origin as Cloudflare will use whichever protocol is supported on Nginx origin - right now that is HTTP/1.1 but if HTTP/2 connection to origin evolves, then you’d be ready.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.