Closed
Conversation
Updated Nginx configuration for MCSManager to enable HTTP/2 and adjusted listen directives.
Removed 'http2' from listen directives and added 'http2 on' for both MCSManager Daemon and Panel.
Removed 'http2' from listen directives and enabled http2 separately.
|
@xufuyu is attempting to deploy a commit to the unitwk's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
这种写法向下兼容吗?我查到是1.25.1开始才有的。 |
Contributor
Author
你提到的这个问题很关键。 http2 on; 这个指令确实是从 Nginx 1.25.1 版本才开始引入的,目的是替代旧的 listen ... http2 写法。 所以,这个修复方案的兼容性需要分情况讨论: 1. 对于 Nginx ≥ 1.25.1: 为了兼顾兼容性,我稍后重新提交一个pr,在文档中注明,供用户依据自己的Nginx版本进行选择。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关于
listen 12333 ssl http2; #IPV4
listen [::]:12333 ssl http2; #IPv6
Nginx会提示
root@mcsm:/# nginx -t
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/xxx.conf:4
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/xxx.conf:5
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
表明指令已过时
现修复为
listen 12333 ssl; #IPV4
listen [::]:12333 ssl; #IPv6
http2 on; # 独立开启http2,作用于整个server块