摘要:建站服务器 wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gz tar zxvf OpenSSL_1_1_1a.tar.gz cd nginx-1.15.
建站服务器
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gz
tar zxvf OpenSSL_1_1_1a.tar.gz
cd nginx-1.15.8/
#通过--with-http_v2_module 打包http2 --with-openssl指定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_1a
make -j2
sudo make install
#最后在nginx conf server下配置
listen 443 ssl http2;
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 2048
openssl 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.com
openssl x509 -in cert.pem -noout -text
相关文章推荐
虚拟主机的专业参数,分别都是什么意思?2022-09-09
中非域名注册规则是怎样的?注册域名有什么用处? 2022-01-10
HostEase新年活动促销 美国/香港主机全场低至五折2021-12-28
HostGator下载完整备份教程分享2021-12-28
Flink中有界数据与无界数据的示例分析2021-12-28