Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx: [warn] the "http2_push_preload" directive is obsolete & the "listen ... http2" directive is deprecated #1445

Closed
drbyte opened this issue Sep 15, 2023 · 2 comments

Comments

@drbyte
Copy link
Contributor

drbyte commented Sep 15, 2023

Description

Using nginx 1.25.2 (currently the latest version) and calling sudo nginx -t to test the config, reveals deprection/obsolete warnings in configs built from Valet's secure.valet.conf stub file:

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in ~/.config/valet/Nginx/foo.test:9
nginx: [warn] the "http2_push_preload" directive is obsolete, ignored in ~/.config/valet/Nginx/foo.test:15
nginx: the configuration file /opt/homebrew/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /opt/homebrew/etc/nginx/nginx.conf test is successful

partial quote of cli/stubs/secure.valet.conf, starting on line 8:
(Lines 9, 10, 15 affected)

server {
    listen 127.0.0.1:443 ssl http2;
    #listen VALET_LOOPBACK:443 ssl http2; # valet loopback
    server_name VALET_SITE www.VALET_SITE *.VALET_SITE;
    root /;
    charset utf-8;
    client_max_body_size 512M;
    http2_push_preload on;

/cc @corneliusio re: http2_push_preload added in #573

Steps To Reproduce

Can also be seen in the output of sudo nginx -t when calling valet diagnose

Upgrade note:
NOTE whenever we change the secure.valet.conf stub file, then when you upgrade your Valet version, it will take effect automatically on each new domain you run valet secure on. You can optionally re-secure all your domains by running valet tld test (where test equates to your .test tld in use; substitute accordingly if you're not using Valet's only officially supported TLD of .test)

Diagnosis

👍

@OpJePl44tsm4n
Copy link
Contributor

Had the same problem with reinstalling latest valet and so also latest nginx.
made a fix in this pr

@driesvints
Copy link
Member

Closing this now that a PR is up. Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants