Nginx 的 HTTP2 谁配置成功了? - V2EX
Andy1999
V2EX    NGINX

Nginx 的 HTTP2 谁配置成功了?

  •  
  •   Andy1999 Oct 14, 2015 via iPhone 6226 views
    This topic created in 3875 days ago, the information mentioned may be changed or developed.
    编译 Nginx1.9.5 加入了 http_v2_module
    openssl 升级到了 1.0.2
    listen 443 ssl http2 依然无效
    请问有人成功过吗?求教程啊
    yeyeye
        1
    yeyeye  
       Oct 14, 2015
    帮你谷歌了下,小弟的建议是一字不差的抄过去,看了几个都是一样的配置方法,只能建议您把 nginx 的支持功能列表查看一下(小弟记得可以查看编译了多少包进去,就知道支持啥功能了)
    server {
    listen 443 ssl http2 default_server;
    ssl_certificate server.crt;
    ssl_certificate_key server.key;
    ...
    }

    来源
    http://www.cnbeta.com/articles/434667.htm
    https://imququ.com/post/nginx-http2-patch.html
    https://winclient.cn/nginx-1-9-5-release-support-http2/

    免责条款
    小弟是菜鸟,表打我,表 bLoCk 我,最好是忽视我的存在
    tms
        2
    tms  
       Oct 14, 2015
    https://tms.im/tms/nginx-http2
    推广自己 blog 的好时候
    Andy1999
        3
    Andy1999  
    OP
       Oct 14, 2015 via iPhone
    @yeyeye
    @tms [root@localhost ~]# nginx -V
    nginx version: nginx/1.9.5
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
    built with OpenSSL 1.0.1e-fips 11 Feb 2013
    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_gzip_static_module --with-ipv6 --with-http_sub_module

    Last login: Mon Oct 12 22:15:54 2015 from 125.227.87.232
    [root@localhost ~]# nginx -V
    nginx version: nginx/1.9.5
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
    built with OpenSSL 1.0.1e-fips 11 Feb 2013
    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_gzip_static_module --with-ipv6 --with-http_sub_module
    [root@localhost ~]# cat /usr/local/nginx/conf/vhost/dl.andy1999.com.conf
    server
    {
    listen 80;
    #listen [::]:80;
    server_name dl.andy1999.com;
    index index.html index.htm index.php default.html default.htm default.php;
    root /home/wwwroot/dl.andy1999.com;
    include other.conf;
    #error_page 404 /404.html;
    location ~ [^/]\.php(/|$)
    {
    # comment try_files $uri =404; to enable pathinfo
    try_files $uri =404;
    fastcgi_pass unix:/tmp/php-cgi.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
    #include pathinfo.conf;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
    expires 30d;
    }

    location ~ .*\.(js|css)?$
    {
    expires 12h;
    }

    access_log /home/wwwlogs/dl.andy1999.com.log access;
    }
    server {
    listen 443 ssl http2;
    server_name dl.andy1999.com ;
    ssl on;
    ssl_certificate /usr/local/nginx/conf/vhost/andy1999.com.crt;
    ssl_certificate_key /usr/local/nginx/conf/vhost/andy1999.com.key;

    ssl_dhparam /usr/local/nginx/conf/vhost/dhparam.pem;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_stapling on;
    ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA";
    ssl_prefer_server_ciphers on;

    add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
    index index.html index.htm index.php default.html default.htm default.php;
    root /home/wwwroot/dl.andy1999.com;
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
    expires 30d;
    }

    location ~ .*\.(js|css)?$
    {
    expires 12h;
    }

    access_log /home/wwwlogs/dl.andy1999.com.log access;
    Andy1999
        4
    Andy1999  
    OP
       Oct 14, 2015 via iPhone
    然而并无卵用 日了妹了
    udumbara
        5
    udumbara  
       Oct 15, 2015
    Joming
        6
    Joming  
       Jan 26, 2024
    不喜欢折腾了,直接套个 CDN 解决。
    About     Help     Advertise     Blog     API     FAQ     Solana     870 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 35ms UTC 21:47 PVG 05:47 LAX 14:47 JFK 17:47
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86