1,使用nginx1.25及以上版本,浏览器开启http3
2,网站配置文件修改:
- listen 443 quic reuseport;
- listen 443 ssl;
- http3 on;
- http2 on;
- ssl_protocols TLSv1.3; # 必需启动TLSv1.3
- location / {
- # 通过响应头告诉浏览器服务器支持HTTP3,以及HTTP3监听的端口
- add_header Alt-Svc 'h3=":443"; ma=86400';
- }
复制代码
3,开启443端口的udp协议 |
|