标签:local gen div span www. 主机 key Opens root
[root@proxy ~]# cd /usr/local/nginx/conf [root@proxy ~]# openssl genrsa > cert.key //生成私钥 [root@proxy ~]# openssl req -new -x509 -key cert.key > cert.pem //生成证书
[root@proxy ~]# vim /usr/local/nginx/conf/nginx.conf … … server { listen 443 ssl; server_name www.c.com; ssl_certificate cert.pem; #这里是证书文件 ssl_certificate_key cert.key; #这里是私钥文件 ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } }
标签:local gen div span www. 主机 key Opens root
原文地址:https://www.cnblogs.com/ray-mmss/p/10147432.html