nginx支持HTTP2的配置过程

1
./configure  *** --with-http_v2_module
1
listen 443  ssl http2;
  • curl支持http2
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    [root@ ~]# wget https://github.com/nghttp2/nghttp2/releases/download/v1.41.0/nghttp2-1.41.0.tar.bz2
    [root@ ~]# tar xf nghttp2-1.41.0.tar.bz2
    [root@ ~]# cd nghttp2-1.41.0
    [root@ ~]# autoreconf -i
    [root@ ~]# automake
    [root@ ~]# autoconf
    [root@ ~]# ./configure --prefix=/usr/local/nghttp2-1.41.0
    [root@ ~]# make && make install

    [root@ ~]# wget http://curl.haxx.se/download/curl-7.46.0.tar.bz2
    [root@ ~]# tar xf curl-7.46.0.tar.bz2
    [root@ ~]# cd curl-7.46.0
    [root@ ~]# ./configure --with-nghttp2=/usr/local/nghttp2-1.41.0/ --with-ssl --prefix=/usr/local/curl-7.46.0/
    [root@ ~]# make && make install
    [root@ ~]# /usr/local/curl-7.46.0/bin/curl --version
    curl 7.46.0 (x86_64-pc-linux-gnu) libcurl/7.46.0 OpenSSL/1.0.2k zlib/1.2.7 nghttp2/1.41.0
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: IPv6 Largefile NTLM NTLM_WB SSL libz HTTP2 UnixSockets

参考文章

评论