大佬们 lnmp中如何开启http/3
听闻http/3性能优异,lnmp一键包好像说是已经支持http/3了,那么如何在lnmp中使用http/3
啊,投毒还没投够嘛? 站点的server块内加入以下内容开启quic
[*]server {
[*] ...
[*] listen 443 ssl;
[*] listen [::]:443 ssl;
[*] listen 443 quic reuseport;
[*] listen [::]:443 quic reuseport;
[*] http2 on;
[*] add_header Alt-Svc 'h3=":443"; ma=86400';
[*] quic_retry on;
[*] ssl_early_data on;
[*] ...
[*]}复制代码
小白鸡 发表于 2024-10-11 10:27
啊,投毒还没投够嘛?
啥投毒啊
static/image/smiley/yct/002.gif
first 检查
[*]root@hetzner-fsn1-002:~# nginx -V
[*]nginx version: nginx/1.26.2
[*]built by gcc 13.2.0 (Ubuntu 13.2.0-23ubuntu4)
[*]built with OpenSSL 1.1.1w11 Sep 2023
[*]TLS SNI support enabled
[*]configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_v3_module --with-http_gzip_static_module --with-http_sub_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_realip_module --with-openssl=/root/lnmp/src/openssl-1.1.1w --with-openssl-opt=enable-weak-ssl-ciphers --add-module=/root/lnmp/src/ngx-fancyindex-0.5.2复制代码
然后 conf 设置
[*]server
[*] {
[*] #listen 443 ssl http2;
[*] #listen [::]:443 ssl http2;
[*] listen 443 ssl;
[*] listen 443 quic reuseport;
[*] listen [::]:443 ssl;
[*] listen [::]:443 quic reuseport;
[*] server_name yoursite.dev ;
[*] index index.html index.htm index.php default.html default.htm default.php;
[*] root/home/wwwroot/yoursite.dev;复制代码
页:
[1]