• nginx1.18支持http2.0


    个人学习笔记,谢绝转载!!!

    原文:https://www.cnblogs.com/wshenjin/p/13522388.html


    nginx并没有默认支持https2.0,需要自行编译安装
    openssl版本,最低要求1.0.2

    安装

    [root@ ~]# wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz
    [root@ ~]# tar xf openssl-1.1.1a.tar.gz
    
    [root@ ~]# wget http://nginx.org/download/nginx-1.18.0.tar.gz
    [root@ ~]# tar xf nginx-1.18.0.tar.gz 
    [root@ ~]# cd nginx-1.18.0
    [root@ nginx-1.18.0]# ./configure  *** --with-http_v2_module  --with-openssl=../openssl-1.1.1a/
    

    配置

    listen 443  ssl http2;
    

    curl支持http2

    [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 
    
  • 相关阅读:
    四则运算2
    四则运算1
    学习进度条
    Mat数据结构
    Markdown语法
    C++继承和派生
    C++智能指针
    clion配置ROS
    视觉十四讲:第六讲_g2o图优化
    视觉十四讲:第六讲_ceres非线性优化
  • 原文地址:https://www.cnblogs.com/wshenjin/p/13522388.html
Copyright © 2020-2023  润新知