alexjustesen / speedtest-tracker

Speedtest Tracker is a self-hosted internet performance tracking application that runs speedtest checks against Ookla's Speedtest service.
https://speedtest-tracker.dev/
MIT License
2.45k stars 89 forks source link

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead #1553

Closed TheGroundZero closed 1 week ago

TheGroundZero commented 1 week ago

Container logs show warning by nginx.

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /config/nginx/site-confs/default.conf:7 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /config/nginx/site-confs/default.conf:8

This relates to the following section in /config/nginx/site-confs/default.conf:

server {
[...]
    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;
[...]
}

The Nginx documentation also mentions this:

The http2 parameter (1.9.5) configures the port to accept HTTP/2 connections. Normally, for this to work the ssl parameter should be specified as well, but nginx can also be configured to accept HTTP/2 connections without SSL.

The parameter is deprecated, the http2 directive should be used instead.

According to the http2 directive documentation, the Nginx config needs to be refactored into:

server {
[...]
    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;

    http2 on;
[...]
}

The 2 listens can probably even be combined into listen *:443 ssl default_server

svenvg93 commented 1 week ago

This is related to the docker image not the application. Your best change to get it resolved is to open an issue with LinuxServer.io

I do see they already changed the config 3 weeks ago: https://github.com/linuxserver/docker-speedtest-tracker/commit/b2b296f122be6071e3afe8cba5fa34cf54602ad7

Which version are you running, as it should fixed in the latest 0.20.6 release

TheGroundZero commented 1 week ago

My dashboard shows App: 0.20.6

podman pull lscr.io/linuxserver/speedtest-tracker:latest

Did not update the image, so it should be the latest

TheGroundZero commented 1 week ago

Existing users should update: site-confs/default.conf to avoid http2 deprecation warnings.

https://github.com/linuxserver/docker-speedtest-tracker/commit/b2b296f122be6071e3afe8cba5fa34cf54602ad7#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R295

Is this an action for users like myself or for the maintainer of the speedtest-tracker image?

svenvg93 commented 1 week ago

It should be done by LSIO which as far as i can see they did.

When i check mine running its http2 is already gone without doing anything.

root@2a24a01d6a67:/# cat defaults/nginx/site-confs/default.conf.sample
## Version 2024/05/28 - Changelog: https://github.com/linuxserver/docker-speedtest-tracker/commits/master/root/defaults/nginx/site-confs/default.conf.sample

server {
    listen *:80 default_server;
    listen *:443 ssl default_server;

    server_name _;

    include /config/nginx/ssl.conf;

nginx is maintianed by LinuxServer.io, this is realated to the docker image and the application it self. Please open an issue with them for this. https://github.com/linuxserver/docker-speedtest-tracker

TheGroundZero commented 1 week ago

OK. Issue solved. I did have to manually remove the nginx config and then reboot the container. Although nginx config seems to be up-to-date, the service logs still mention a newer version being available 🤷‍♂️

https://github.com/linuxserver/docker-speedtest-tracker/issues/17#issuecomment-2182170690