serversideup / docker-php

🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
https://serversideup.net/open-source/docker-php/
GNU General Public License v3.0
1.65k stars 108 forks source link

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/site-opts.d/https.conf:2 #363

Closed jaydrogers closed 1 month ago

jaydrogers commented 3 months ago

Affected Docker Images

*-fpm-nginx

Docker Labels of the affected images

No response

Current Behavior

On container start, a warning appears:

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/site-opts.d/https.conf:2

Expected Behavior

This warning should not display

Steps To Reproduce

Run the container and check the log output:

docker run --rm serversideup/php:8.3-fpm-nginx

Anything else?

Proposed Fix

Here is a possible fix, but we have to wait until Alpine is on NGINX 1.26

Current configuration

server {
    listen 8443 http2 ssl default_server;
    listen [::]:8443 http2 ssl default_server;
    # other configurations
}

Updated Configuration

server {
    listen 8443 ssl default_server;
    listen [::]:8443 ssl default_server;
    http2 on;
    # other configurations
}