Get the App
SLTechnology News&Howtos  ›  Servers  › 

Build https+http2 by nginx

Shulou Source: shulou.com Published: 2022-06-02 00:51:06 11月14日 Update

Wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gztar zxvf OpenSSL_1_1_1a.tar.gzcd nginx-1.15.8/# specifies the openssl directory through-- with-http_v2_module packaging http2-- with-openssl. / configure-- prefix=/usr/local/nginx-- with-http_stub_status_module-- with-http_ssl_module-- with-http_realip_module-- with-http_v2_ Module-- with-openssl=../openssl-OpenSSL_1_1_1amake-j2sudo make install # finally configure listen 443 ssl http2 under nginx conf server Server_name localhost;ssl_certificate_key / home/anfang/Downloads/cert/key.pem;ssl_certificate / home/anfang/Downloads/cert/cert.pem;openssl genrsa-out key.pem 2048openssl req-new-x509-sha256-key key.pem\-out cert.pem-days 36500\-subj / C=CN/ST=Shanghai/L=Songjiang/O=ztgame/OU=tech/CN=mydomain.ztgame.com/emailAddress=myname@ztgame.comopenssl x509-in cert.pem-noout-text

Tags: Directories configurin Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology MariaDB Linux MySQL