nginx: Use "http2" directive

The "http2" option is passed to the "listen" directive. This seems to deprecated because it results in this line in the logging:

nginx: [warn] the "listen ... http2" directive is deprecated, use
the "http2" directive instead in [snip]/nginx/conf/nginx.conf:43

So nginx made this option deprecated and expects user to use the "http2" directive instead.

Modify the template to use the "http2" directive.

Before this change, the nginx.conf would have:

server {
  listen gdk.test:443 ssl http2;

  [snip]
}

After this change, it will look like:

server {
  listen gdk.test:443 ssl;
  http2 on

  [snip]
}

You can read more about it in the following blog post https://aruljohn.com/blog/nginx-listen-http2-directive-deprecated/.

Merge request reports

Loading