Nginx's "listen ... http2" directive is deprecated
Summary
- In Nginx versions 1.25.1 and above, "listen ... http2" directive is deprecated. (Link)
- And the omnibus-gitlab package upgraded its bundled Nginx version to1.27 on GitLab 17.6. (Link)
- However,
nginx.conffile in GitLab Omnibus package is still using this directive. As this result, the following warning messages are logged in the/var/log/gitlab/nginx/error.logand/var/log/gitlab/nginx/current(See "Relevant logs" section)
Steps to reproduce
- Install GitLab by using gitlab-omnibus
- Run
sudo gitlab-ctl tail -f - Run
sudo gitlab-ctl restartin another command line console that is running the above command - Confirm the warning messages are logged into
/var/log/gitlab/nginx/error.logand/var/log/gitlab/nginx/current
What is the current bug behavior?
Warning messages are logged
What is the expected correct behavior?
No warning happened
Relevant logs
Relevant logs
==> /var/log/gitlab/nginx/current <== 2025-02-28_03:25:35.77475 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-02-28_12:20:05.87144 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-02-28_12:28:01.65119 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-03-03_09:56:28.71263 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-03-04_06:52:12.69702 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-03-04_07:20:03.54326 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-03-04_07:42:17.63691 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-03-04_07:48:26.27812 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-03-04_08:00:33.74712 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025-03-04_08:02:39.16906 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 ==> /var/log/gitlab/nginx/error.log <== 2025/03/04 07:20:03 [warn] 4716#0: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025/03/04 07:42:17 [warn] 41898#0: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025/03/04 07:48:26 [warn] 42646#0: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025/03/04 08:00:33 [warn] 44447#0: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66 2025/03/04 08:02:39 [warn] 44944#0: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /var/opt/gitlab/nginx/conf/gitlab-http.conf:66
Details of package version
Provide the package version installation details
[ec2-user@ip-172-31-27-92 ~]$ rpm -qa | grep 'gitlab' gitlab-ee-17.9.1-ee.0.amazon2023.x86_64
References
-
HTTP2 NGINX module: https://nginx.org/en/docs/http/ngx_http_v2_module.html
-
NGINX changelog: https://nginx.org/en/CHANGES
1.25.1: The "http2" directive, which enables HTTP/2 on a per-server basis; the "http2" parameter of the "listen" directive is now deprecated.
Edited by Clemens Beck