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

update: use nginx http2 directive #2485

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tetuaoro
Copy link

@tetuaoro tetuaoro commented Mar 2, 2025

Hi,

In this PR, I've updated the nginx config to follow nginx's recommendations and remove warnings when running the nginx -t command.

Changes

  • removed the http2 directive from the listen instructions for ports 443
  • added the http2 on; directive to explicitly enable HTTP/2.

Note

To fully eliminate the warnings, it is essential that all nginx config files follow this same recommendation, including any custom configurations.

Warn log

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/domain.name:14

- use (the new http2 directive)[https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2]
- remove warnings when you run  `nginx -t`
Copy link
Contributor

@dms00 dms00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@JoshData
Copy link
Member

JoshData commented Mar 3, 2025

The documentation says "This directive appeared in version 1.25.1." and my nginx is 1.18.0.

@tetuaoro
Copy link
Author

tetuaoro commented Mar 5, 2025

The documentation says "This directive appeared in version 1.25.1." and my nginx is 1.18.0.

Hi, when you say "my", do you mean MailInABox or your server ?

Yeah my server update nginx all the time.

@JoshData
Copy link
Member

JoshData commented Mar 5, 2025

My live Mail-in-a-Box. I would expect all Mail-in-a-Box instances to have the same version. And since it's prior to 1.25.1, the http2 directive is not yet available.

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

Successfully merging this pull request may close these issues.

3 participants