如何在Nginx中禁用HTTP2

编程入门 行业动态 更新时间:2024-10-23 15:28:07
本文介绍了如何在Nginx中禁用HTTP2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

由于此 HTTP/2和Form POSTS的Safari问题,我想禁止通过HTTP/2.因此,我只是从相应的nginx服务器块中的server_name指令中删除了"http2".

due to this Safari Issue with HTTP/2 and Form POSTS I wanted to disable serving one Webpage via HTTP/2. So I just removed the "http2" from the server_name directive in corresponding nginx server block.

server { listen x.x.x.x:443 ssl; server_name xxxx; [...] }

但是,当我重新启动NginX并在各种浏览器中打开网站后,HTTP/2协议仍在使用...我在做什么错了?

But after I restarted NginX and opened the website in various browsers the HTTP/2 Protocol is still used... What am I doing wrong?

我的NginX版本是1.10.1

My NginX version is 1.10.1

问候Jan

推荐答案

有人在这里回答了正确的解决方法,但是帖子不见了...

Someone answered with the correct solution here, but the post disappeared...

您必须为一个IP地址/端口上的所有服务器块禁用http2.如果有一个服务器块配置为启用http2,则该IP上的所有服务器块均已启用.

You have to disable http2 for all server blocks on one IP Adress / Port. If there is one server block configured to enable http2 it is enabled for all server blocks on this IP.

更多推荐

如何在Nginx中禁用HTTP2

本文发布于:2023-11-01 20:06:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550281.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   Nginx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!