nginx搭建https + http2

  
 <代码> wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gz
  焦油zxvf OpenSSL_1_1_1a.tar.gz
  
  cd nginx-1.15.8/#通过——with-http_v2_module打包http2——使用openssl指定openssl目录
  ./configure——prefix=/usr/地方/nginx——with-http_stub_status_module——with-http_ssl_module with-http_realip_module——with-http_v2_module openssl=. ./openssl-OpenSSL_1_1_1a
  使j2
  
  sudo make install
  #最后在nginx服务器配置下配置
  
  听443 ssl http2;
  server_name主机;
  
  ssl_certificate_key/home/anfang/Downloads/cert/key.pem;
  ssl_certificate/home/anfang/Downloads/cert/cert.pem;
  
  openssl genrsa治疗关键。pem 2048
  
  openssl点播- x509 -sha256关键的关键。pem \
  两级cert.pem \ 36500天
  主题/C=CN/ST=Shanghai/L=Songjiang/O=ztgame/OU=tech/CN=mydomain.ztgame.com/emailAddress=myname@ztgame.com
  
  openssl x509——cert.pem -noout语境 

nginx搭建https + http2